Hi Folks,
In dealing with the RB EmailMessage class, I've gotten everything
working except the formatting of the body text endofline. I know that
the RFC says to use 13/10, but all attempts have still resulted in my
message body becoming one long line.
Here's the pertinent part of my code:
Dim Mail As New EmailMessage
Dim theSocket As MySocket // subclass of SMTPSocket
Mail.Subject = "Job Report - " + BackupLabel
Mail.FromAddress = WPreferences.efSMTPFromAddress.Text
Mail.BodyPlainText = ReplaceLineEndings(MailBody,
EndOfLine.Macintosh, EndOfLine.Windows)
Mail.Headers.AppendHeader "Content-Type", "text/plain;
charset=""ISO-8859-1"""
Mail.Headers.AppendHeader "Content-Transfer-Encoding", "7bit"
Mail.Headers.AppendHeader "X-Mailer","LE Mail Agent"
For x = 1 To CountFields(MailTo, ",")
Mail.AddRecipient(Trim(NthField(MailTo, ",", x)))
Next
TheSocket.Messages.Append Mail
TheSocket.SendMail
I've also tried specifying Chr(13)+Chr(10) in case EndOfLine.Windows
wasn't getting processed, but no matter what I provide, the body is
one long line in "some" mail scenarios. If I mail myself and open the
mail in Apple Mail, it looks correct. However, if I mail my .mac
account and retrieve the message in Apple Mail, the body is a long
single line. Also, sending the mail to hotmail and gmail result in
the badly formatted result.
Any ideas of what might be happening here or something I've missed?
Thanks,
Tim
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>
|