Hello!
Could somebody help me with my code? The problem is - I can't make vbcrlf work for the plain text e-mail. If I am using vbcrlf people getting unformatted text (no new lines). Same as if I preview it in browser using Response.Write(strBodyText) --- see below.
If I use "<br>" instead of vbcrlf than users are getting text displaying <BR> "Dear Name<br>text.....<br>Thank you, etc"
Please advise how to send plain text e-mail with carriage return correctly.
P.S. I tryed Chr(13), Chr (10), vbnewline - nothing helps.... :(
Thanks
[PHP]<%
Dim objMyMessage, objMyConfiguration
Set objMyMessage = Server.CreateObject("CDO.Message")
Set objMyConfiguration = Server.CreateObject ("CDO.Configuration")
objMyConfiguration.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
objMyConfiguration.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "mail.server.com"
objMyConfiguration.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
objMyConfiguration.Fields("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = False
objMyConfiguration.Fields("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60
objMyConfiguration.Fields("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1 'basic (clear-text) authentication
objMyConfiguration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusername") ="info@server.com"
objMyConfiguration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendpassword") ="password"
objMyConfiguration.Fields.Update
Set objMyMessage.Configuration = objMyConfiguration
strBodyText = "Dear somebody" & vbNewLine
strBodyText = strBodyText &"Thank you," & vbcrlf
strBodyText = strBodyText & "text"
objMyMessage.To = "to@email.com"
objMyMessage.From = "from@email.com"
objMyMessage.Subject = "RE: subject"
objMyMessage.TEXTBody = strBodyText
'objMyMessage.Send
Set objMyMessage = Nothing
Set objMyConfiguration = Nothing
Response.Write(strBodyText)
%>[/PHP]