Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem w/ HTML e-mail

Status
Not open for further replies.

mgifford

Programmer
Jun 3, 2004
30
US
I have set up a trade form for our employees using VBScript that sends an e-mail in HTML. It comes through fine w/ all three sections (i.e. Partner 1, Partner 2, Administrative Approval). When you reply to the e-mail (using Word as the e-mail editor - If you do not use Word as the e-mail editor, it replies/forwards fine), the Partner 1 and Administrative Approval sections are included on the e-mail, but the Partner 2 information disappears. Here's what it comes through as:

Partner 1
Name: test
E-mail: test@cc-ems.com
Shift:
Station: 1
Date:

Partner 2
Name: test
E-mail: test@cc-ems.com
Shift:
Station: 2
Date:

Comments:
ADMINISTRATIVE USE
Approval:
Date Approved:
Here's what you see when you reply to the e-mail:

Partner 1
Name: test
E-mail: test@cc-ems.com
Shift:
Station: 1
Date:

Comments:
ADMINISTRATIVE USE
Approval:
Date Approved:

Any ideas on what I can do to correct the issue so when the user has Word as their editor it will work?

Thanks,
Marcy
 
Post your script or the actual HTML of the message you are replying to.

I hope you find this post helpful.

Regards,

Mark
 
semailaddress = Session("UserID") & "@cc-ems.com"
semailaddress2 = Request.Form("Email2")

If Request.querystring("action")="send" then

sBody = "<html>"
sBody = sBody & "<head>"
sBody = sBody & " <meta http-equiv='Content-Type' content='text/html'>"
sBody = sBody & "</head>"
sBody = sBody & "<body>"
sBody = sBody & "<p align='center'><font color='#000000' face='Arial' size='4'><b>COSHOCTON COUNTY EMS</b></font></p>" & vbCRLF
sBody = sBody & " <p align='center'><font color='#000000' face='Arial' size='3'><b>REQUEST FOR CHANGE IN POSTED SCHEDULE</b></font></p>" & vbCRLF
sBody = sBody & "<p><font color='#000000' face='Arial' size='4'><b></b></font></p>" & vbCRLF
sBody = sBody & "<p><font color='#000000' face='Arial' size='3'><b>Partner 1</b></font></p>" & vbCRLF
sBody = sBody & "<p style='text-indent: 0; margin-left: 10><font color='#000000' face='Arial' size='2'><b>Name:&nbsp;&nbsp</b></font>" & Request.Form("Partner1") & "</p>" & vbCRLF
sBody = sBody & "<p style='text-indent: 0; margin-left: 10><font color='#000000' face='Arial' size='2'><b>E-mail:&nbsp;&nbsp</b></font>" & Request.Form("email") & "</p>" & vbCRLF
sBody = sBody & "<p style='text-indent: 0; margin-left: 10><font color='#000000' face='Arial' size='2'><b>Shift:&nbsp;&nbsp</b></font>" & Request.Form("Shift1") & "</p>" & vbCRLF
sBody = sBody & "<p style='text-indent: 0; margin-left: 10><font color='#000000' face='Arial' size='2'><b>Station:&nbsp;&nbsp</b></font>" & Request.Form("Station1") & "</p>" & vbCRLF
sBody = sBody & "<p style='text-indent: 0; margin-left: 10><font color='#000000' face='Arial' size='2'><b>Date:&nbsp;&nbsp</b></font>" & Request.Form("Date1") & "</p>" & vbCRLF
sBody = sBody & vbCRLF
sBody = sBody & "<p><font color='#000000' face='Arial' size='3'><b>Partner 2</b></font></p>" & vbCRLF
sBody = sBody & "<p style='text-indent: 0; margin-left: 10><font color='#000000' face='Arial' size='2'><b>Name:&nbsp;&nbsp</b></font>" & Request.Form("Partner2") & "</p>" & vbCRLF
sBody = sBody & "<p style='text-indent: 0; margin-left: 10><font color='#000000' face='Arial' size='2'><b>E-mail:&nbsp;&nbsp</b></font>" & Request.Form("email2") & "</p>" & vbCRLF
sBody = sBody & "<p style='text-indent: 0; margin-left: 10><font color='#000000' face='Arial' size='2'><b>Shift:&nbsp;&nbsp</b></font>" & Request.Form("Shift2") & "</p>" & vbCRLF
sBody = sBody & "<p style='text-indent: 0; margin-left: 10><font color='#000000' face='Arial' size='2'><b>Station:&nbsp;&nbsp</b></font>" & Request.Form("Station2") & "</p>" & vbCRLF
sBody = sBody & "<p style='text-indent: 0; margin-left: 10><font color='#000000' face='Arial' size='2'><b>Date:&nbsp;&nbsp</b></font>" & Request.Form("Date2") & "</p>" & vbCRLF
sBody = sBody & "<p><font color='#000000' face='Arial' size='3'><b>Comments:</b></font></p>" & vbCRLF
sBody = sBody & Request.Form("comments") & vbCRLF
sBody = sBody & " <p style='text-indent: 0; margin-left: 10; margin-top: 6; margin-bottom: 6' align='left'><font face='Bookman Old Style' size='2'><b>ADMINISTRATIVE USE</b></font></p>"
sBody = sBody & " <p style='text-indent: 0; margin-left: 10; margin-top: 6; margin-bottom: 6' align='left'><font face='Bookman Old Style' size='2'><b>Approval:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</b></font></p>"
sBody = sBody & " <p style='text-indent: 0; margin-left: 10; margin-top: 6; margin-bottom: 6' align='left'><font face='Bookman Old Style' size='2'><b>Date Approved:&nbsp;</b></font>"
sBody = sBody & " </body></html>"

Set objMsg = Server.CreateObject("CDONTS.NewMail")
objMsg.Body = sBody
objMsg.From = Request.Form("Email")
objMsg.Subject = "Trade Request "
objMsg.BodyFormat = 0
objMsg.MailFormat = 0

Select Case Request.Form("Station1")
Case "1"
objMsg.To = "mmwood@cc-ems.com; bminet@cc-ems.com; cshriver@cc-ems.com; jlawrence@cc-ems.com; mperkins@cc-ems.com;" & semailaddress & ";" & semailaddress2

Case "2"
objMsg.To = "mmwood@cc-ems.com; bminet@cc-ems.com; cshriver@cc-ems.com; jlawrence@cc-ems.com; mperkins@cc-ems.com;" & semailaddress & ";" & semailaddress2

Case "3"
objMsg.To = "mmwood@cc-ems.com; bminet@cc-ems.com; cshriver@cc-ems.com; jlawrence@cc-ems.com; mperkins@cc-ems.com;" & semailaddress & ";" & semailaddress2

End Select

Select Case Request.Form("Station2")
Case "1"
objMsg.To = "mmwood@cc-ems.com; bminet@cc-ems.com; cshriver@cc-ems.com; jlawrence@cc-ems.com; mperkins@cc-ems.com;" & semailaddress & ";" & semailaddress2

Case "2"
objMsg.To = "mmwood@cc-ems.com; bminet@cc-ems.com; cshriver@cc-ems.com; jlawrence@cc-ems.com; mperkins@cc-ems.com;" & semailaddress & ";" & semailaddress2

Case "3"
objMsg.To = "mmwood@cc-ems.com; bminet@cc-ems.com; cshriver@cc-ems.com; jlawrence@cc-ems.com; mperkins@cc-ems.com;" & semailaddress & ";" & semailaddress2

End Select

objMsg.Send
Set objMsg = Nothing

Response.Redirect "tradeconf.asp"

End if

%>
 
i confess I see no differences in how you have set up the sections. Does the actual email code received at the client end show any differences?

I hope you find this post helpful.

Regards,

Mark
 
>[tt]sBody = sBody & "<p style='text-indent: 0; margin-left: 10><font color='#000000' face='Arial' size='2'><b>Name:&nbsp;&nbsp</b></font>" & Request.Form("Partner1") & "</p>" & vbCRLF[/tt]

[tt]sBody = sBody & "<p style='text-indent: 0; margin-left: 10[COLOR=red yellow]'[/color]><font color='#000000' face='Arial' size='2'><b>Name:&nbsp;&nbsp</b></font>" & Request.Form("Partner1") & "</p>" & vbCRLF[/tt]

and each and every repetition of the same line.
 
tsuji you are the best!

I hope you find this post helpful.

Regards,

Mark
 
Thanks Mark.[blush] Do not know if it really help. (Also never really play with Smileys and want to experiment its use.[dazed])
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top