Our club directors are using online.outlook.com as a webmail solution for messaging, and I have noticed something peculiar in that while messages sent to the directors from a mail client like Thunderbird look ok, any emails sent from our online webform look a mess.
For example...
Contact = 192.168.0.2 via /contact.asp?
ID=7&Subject=Text+format&Name=John&Email=john%40example.com&Message=Click+inside+calendar+to+add+event%2C+move+or+resize+existing+events%2C+select+multiple+days%2C+etc.&g-recaptcha-response=03AGdBq26BbA8M9TkyW521mNLZ6nksqV4EdzajclTJ653GsN4E3opCUKEdrt5hA1orva_V3OF7TghktsatMauhu1Oue6TzMF2xO1wPssI7PCOiwMKcdVGWEprbRkaBxKhyJWo52vFNiuN3cO8xobvydyNcbKyYqPNWn0dZVwhN2Tav4WRQWOp5x1-0lANfpVBtVz8RaxoeAMii5e97tgCbGb06y0VjusA6zYappXDl__E95Zm5Lxm7TakVGhWx-SzRpFsmJJB3aCP1TvsEJIDMn3NN31OZA2SpsvblGywTdAUYQoy7VaWghjgcOoOdCZ2y-oE06l2p5OZ5q1Et_w4SClcrouAjL4rge-i8EIucpYJHKJZtPPoDTT9HPlc4h0T0Hab8frxxeB280O22kPicnYo7lAkU_3TCoj39eYEfyv1s40F5m9opfVF5p36mMRRVcpasp6EXjlwVf8FM6fAgqaMYGd6S6_u1vw&Submit=Submit
-------------------------------------------------------------
Name: John
Email: john@example.com
Subject: Text format
-------------------------------------------------------------
Dear John
Click inside calendar to add event, move or resize existing events, select multiple days, etc.
Everything above "Name: John" should not be shown and is not shown when the email is sent from Thunderbird.
The code that I used on the mail page looks like...
Set ObjSendMail = CreateObject("CDO.Message")
ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/config ... /sendusing") = 2 'Send the message using the network (SMTP over the network).
ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/config ... smtpserver") = strMailServer
ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/config ... thenticate") = strSmtpAuthenticate
ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/config ... ndusername") = strSmptAuthUser
ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/config ... ndpassword") = strSmptAuthPass
ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/config ... serverport") = 25
ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/config ... smtpusessl") = False 'Use SSL for the connection (True or False)
ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/config ... iontimeout") = 60
ObjSendMail.Configuration.Fields.Update
ObjSendMail.To = strName & " <" & strEmail & ">"
ObjSendMail.Subject = strSubject
ObjSendMail.From = strFromName & " <" & strFromEmail & ">"
ObjSendMail.ReplyTo = strSender & " <" & strSenderEmail & ">"
ObjSendMail.BodyPart.Charset = "UTF-8"
ObjSendMail.TextBody = strEmailBody
ObjSendMail.TextBodyPart.Charset = "UTF-8"
On Error Resume Next
ObjSendMail.Send
Set ObjSendMail = Nothing
Charset for the page is set to UTF-8.
Anyone seen this before and know how to prevent it?
I had a similar problem and spent days trying to solve it. In the end it was quite simple to fix but difficult to understand how it could be so. But I finally got to send emails that didn't include header data in the email body.
I found that all my pages were using the same include.asp that contained a collection of functions. I solved the problem when I disabled any that were using server variables such as...
strCheckIPnumber = Request.ServerVariables("REMOTE_ADDR")
I didn't want to lose those server variables, so I made their collection conditional so that the webforms for email could exclude them.