CDO Email Syntax Question

J

JNariss

Hello,

I finally figured out how to get my form to its database and have an
email come my way. However I am now trying to set up the body of the
email to include the form details. However the body of the email that
is sent only includes the last line of the "body" tag and has no
details next to it.

The email sent shows up with this in its body:

Request Date:


AND NOTHING ELSE.

The script/code I am using is:

<%
Set objMessage = CreateObject("CDO.Message")
objMessage.Subject = "New Form"
objMessage.Sender = "Intranet"
objMessage.To = "(e-mail address removed)"
objMessage.TextBody="An IT Employee Status Change form has been filled
out. Please see the information below: " & VbCrLf
objMessage.TextBody="Employee Name: " & Request.Form("EmployeeName") &
VbCrLf
objMessage.TextBody="Pay Number: " & Request.Form("PayNumber") & VbCrLF
objMessage.TextBody="Requested By: " & Request.Form("RequestedBy") &
VbCrLF
objMessage.TextBody="Request Date: " & Request.Form("RequestDate")

objMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing")
= 2
objMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver")
= "155.116.12.19"
objMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport")
= 25
objMessage.Configuration.Fields.Update

objMessage.Send
%>


As you can see from above I am trying to get the body of the email to
look like this:


An IT Employee Status Change form has been filled out. Please see the
information below:

Employee Name: Someones Name
Pay Number: XX333
Requested By: Someones Name
Request Date: mm/dd/yy



All the above fields are the fields to my form that users will be
filling out.
Any help would be greatly appreciated.

Thanks,
Justine
 
H

Herfried K. Wagner [MVP]

I finally figured out how to get my form to its database and have an
email come my way. However I am now trying to set up the body of the
email to include the form details. However the body of the email that
is sent only includes the last line of the "body" tag and has no
details next to it.

Your question seems to be related to Classic ASP. I suggest to ask it at
"microsoft.public.inetserver.asp.general".
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top