Hi there,
I’m trying to compose a multipart email message with XOJO Web Edition. But somehow XOJO won’t place the necessary informations about Content-Type and Content-Transfer-Encoding on top of the html- and text-boundaries.
In the sourcecode of a well formated email it should look like this:
[code]MIME-Version: 1.0
Content-Type: multipart/alternative;
boundary="----=NextMime00A_000_55632468D"
This is a multi-part message in MIME format.
------=NextMime00A_000_55632468D
Content-Type: text/plain;
charset=“iso-8859-1”
Content-Transfer-Encoding: quoted-printable
[/code]
But it looks like this - Charset and Content-Transfer-Encoding are missing:
[code]Content-Type: multipart/alternative; boundary=“4rytxhtkuls2”
–4rytxhtkuls2
Content-type: text/plain;
[/code]
My code looks like this. MailSocket is a class with super SMTPSecureSocket. Emails are sent and look well formatted in my email-client. But other clients, which aren’t so capable in detecting the UTF8-format will show strange signs for the german Umlaute (, , , ).
[code]
Dim smtp As New MailSocket
Dim mail as EmailMessage
Dim i as integer
// set up the socket
smtp.Address = glbMailSMTP
smtp.Port = 25
smtp.SMTPConnectionMode = SMTPSecureSocket.ModeSTARTTLS
smtp.username = stLoginMailAccount
smtp.password = stLoginMailPwd
// Subject codieren
Dim Subject as string
Subject=EncodeBase64(stSubject, 76)
Subject = "=?utf-8?B?"+Subject+"?="
mail = New EmailMessage
mail.FromAddress = stFrom
mail.subject = Subject
mail.BodyHTML = vHMail
mail.bodyPlainText = vTMail
mail.AddRecipient(vRecipient)
// Header
mail.headers.appendHeader "X-Mailer","amc-forum.de"
mail.headers.AppendHeader "MIME-Version", "1.0"
mail.headers.AppendHeader "Content-Type", "text/html; charset=UTF8"
mail.headers.AppendHeader "Content-Transfer-Encoding", "8bit"
mail.headers.AppendHeader "Return-Path", stFrom
mail.headers.AppendHeader "Reply-To", stFrom
// Mail anhngen und senden
smtp.Messages.Append mail
smtp.SendMail[/code]
Any ideas or assistance would be appreciated.