diff options
Diffstat (limited to 'mcs/class/System.Web/System.Web.Mail/SmtpClient.cs')
-rw-r--r-- | mcs/class/System.Web/System.Web.Mail/SmtpClient.cs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/mcs/class/System.Web/System.Web.Mail/SmtpClient.cs b/mcs/class/System.Web/System.Web.Mail/SmtpClient.cs index 25569cfc074..d77652c1384 100644 --- a/mcs/class/System.Web/System.Web.Mail/SmtpClient.cs +++ b/mcs/class/System.Web/System.Web.Mail/SmtpClient.cs @@ -140,6 +140,7 @@ namespace System.Web.Mail { string boundary = MailUtil.GenerateBoundary(); // set the Content-Type header to multipart/mixed + string bodyContentType = msg.Header.ContentType; msg.Header.ContentType = String.Format( "multipart/mixed;\r\n boundary={0}" , boundary ); @@ -151,7 +152,13 @@ namespace System.Web.Mail { smtp.WriteBoundary( boundary ); MailHeader partHeader = new MailHeader(); - partHeader.ContentType = "text/plain"; + partHeader.ContentType = bodyContentType; + +#if NET_1_1 + // Add all the custom headers to body part as specified in + //Fields property of MailMessageWrapper + partHeader.Data.Add(msg.Fields.Data); +#endif smtp.WriteHeader( partHeader ); |