Sending Multipart email with WebDAV to external addresses

I've manage to send a multi-part(html and plaintext) email with attachments through webdav in exchange 2003 and as long as its sent to a user on the exchange server.

My problem is when the email is sent to an external email.  exchange drops the html section. and only sends the text/plain section.

steps to send.

1) http put to create the mail message in drafts

 format

 var strBody = string.Format( "From: {0}\n" + "To: {1}\n" + "Subject: {2}\n" + "Date: {3}\n" + "X-Mailer: {4}\n" + "MIME-Version: 1.0\n", message.From, message.To, message.Subject, DateTime.Now, "Thomson.MIS.Notification.WebDavTeleSalesGateway");
 
        const string boundary = "====_NextPart_0====";

            strBody += string.Format(
               "Content-Type: multipart/alternative; Boundary=\"{0}\"\n\n" +
               "--{0}\n" +
               "Content-Type: text/plain;\n" +
               "Charset=\"iso-8859-1\"\n" +
               "Content-Transfer-Encoding: 8bit\n\n{1}\n\n" +
               "--{0}\n" +
               "Content-Type: text/html;\n" +
               "Charset=\"iso-8859-1\"\n" +
               "Content-Transfer-Encoding: 8bit\n\n{2}\n" +
               "--{0}"
               , boundary, plainTextBody, htmlBody);

2) http PROPPATCH to set message up to receive attachments
3) http posts to add attachments to message
4) http MOVE to move the email to ##DavMailSubmissionURI## send the email

I've checked that the string in the put request to create the email in the drafts folder is correct, but the mail sent to the external mailbox has been changed and the html section dropped.

I noticed the boundary id has also been changed, but i assume this was changed when the attachments were posted to the message before it was sent.
simonwilberthurleyAsked:
Who is Participating?
 
Satya PathakConnect With a Mentor Lead Technical ConsultantCommented:
0
 
simonwilberthurleyAuthor Commented:
supplied the right link to explain the fundamentals to the answer
0
All Courses

From novice to tech pro — start learning today.