Hi,
I have an app that has beenusing the JMail COM component to generate emails.
I would like to switch to the using the .Net 2.0 MailMessage object
instead - as it is more portable.
The jmail component allowed me to set both an HTML body and a text body -
this meant that if a users' email client didn't support html - the user
would see the text only version with an html attachment. The MailMessage
object only appears to have one Body setting and you have to switch it
between IsHtml or not.
Is there any way of sending both text and html versions in one email as
jmail does - but using interval .Net objects?
Thanks in advance,
Stu
Dim oSmtp As New SmtpClient
oSmtp.DeliveryMethod = SmtpDeliveryMethod.SpecifiedPickupDirectory
oSmtp.PickupDirectoryLocation = "c:\Pickup\"
oSmtp.UseDefaultCredentials = True
Dim oMsg As New MailMessage()
oMsg.From = New MailAddress(my********@domain.com)
oMsg.To.Add(New MailAddress(me@domain.com)
oMsg.Subject = "My Subject..."
oMsg.IsBodyHtml = True
oMsg.Body = "My HTML...blah..."
oSmtp.Send(oMsg)