G
Guest
Hi,
I am having problem sending email to external mailbox using HTML format.
Following is a simplified code that I used to send the email.
Dim myMsg As New MailMessage
Dim htmlBody As String
htmlBody = "<HTML><BODY><A
HREF='http://www.microsoft.com'>Microsoft</A></BODY></HTML>"
myMsg.From = "(e-mail address removed)"
myMsg.To = "(e-mail address removed)"
myMsg.Subject = "Testing HTML"
myMsg.BodyFormat = MailFormat.Html
myMsg.Body = htmlBody
System.Web.Mail.SmtpMail.SmtpServer = "smtpserver.domain.com"
System.Web.Mail.SmtpMail.Send(myMsg)
My SMTP server is an Exchange 2003 server with SP2. When using the same
code to send email to internal mailbox (with our Exchange Organization), the
HTML format was retained. However when email was sent out to external
mailbox (e.g. hotmail, yahoo, gmail), it was converted to plain text. I had
tried using Outlook to send email using HTML format to external mailbox and
it remains as HTML format.
Hope that someone can enlighten me.
Thanks In Advance,
Alex
I am having problem sending email to external mailbox using HTML format.
Following is a simplified code that I used to send the email.
Dim myMsg As New MailMessage
Dim htmlBody As String
htmlBody = "<HTML><BODY><A
HREF='http://www.microsoft.com'>Microsoft</A></BODY></HTML>"
myMsg.From = "(e-mail address removed)"
myMsg.To = "(e-mail address removed)"
myMsg.Subject = "Testing HTML"
myMsg.BodyFormat = MailFormat.Html
myMsg.Body = htmlBody
System.Web.Mail.SmtpMail.SmtpServer = "smtpserver.domain.com"
System.Web.Mail.SmtpMail.Send(myMsg)
My SMTP server is an Exchange 2003 server with SP2. When using the same
code to send email to internal mailbox (with our Exchange Organization), the
HTML format was retained. However when email was sent out to external
mailbox (e.g. hotmail, yahoo, gmail), it was converted to plain text. I had
tried using Outlook to send email using HTML format to external mailbox and
it remains as HTML format.
Hope that someone can enlighten me.
Thanks In Advance,
Alex