L
les
I'm getting this error "BC30456: 'IsBodyHtml' is not a member of
'System.Net.Mail.SmtpClient'" when trying to submit a form and send
email.
If I remove the line "MailObj.IsBodyHtml = True" the mail sends
without error, but html markup is visible in the body of the email.
Any suggestions?
Code below:
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Button1.Click
if ispostback then
Dim MailObj As New System.Net.Mail.SmtpClient
EmFrom.Text="(e-mail address removed)"
EmTo.Text="(e-mail address removed)"
EmSubj.Text="Subject Here"
EmMsg.Text="<b>Some html here....</b>"
MailObj.Host = "localhost"
MailObj.IsBodyHtml = True
MailObj.Send(EmFrom.Text, EmTo.Text, EmSubj.Text, EmMsg.Text)
end if
End Sub
Thanks
Leslie
'System.Net.Mail.SmtpClient'" when trying to submit a form and send
email.
If I remove the line "MailObj.IsBodyHtml = True" the mail sends
without error, but html markup is visible in the body of the email.
Any suggestions?
Code below:
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Button1.Click
if ispostback then
Dim MailObj As New System.Net.Mail.SmtpClient
EmFrom.Text="(e-mail address removed)"
EmTo.Text="(e-mail address removed)"
EmSubj.Text="Subject Here"
EmMsg.Text="<b>Some html here....</b>"
MailObj.Host = "localhost"
MailObj.IsBodyHtml = True
MailObj.Send(EmFrom.Text, EmTo.Text, EmSubj.Text, EmMsg.Text)
end if
End Sub
Thanks
Leslie