I'm getting this error "BC30456: 'IsBodyHtml' is not a member of
'System.Net.Mai l.SmtpClient'" when trying to submit a form and send
email.
If I remove the line "MailObj.IsBody Html = 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(B yVal sender As Object, ByVal e As
System.EventArg s) Handles Button1.Click
if ispostback then
Dim MailObj As New System.Net.Mail .SmtpClient
EmFrom.Text="so *****@somewhere .com"
EmTo.Text="so** ***@somewhere.c om"
EmSubj.Text="Su bject Here"
EmMsg.Text="<b> Some html here....</b>"
MailObj.Host = "localhost"
MailObj.IsBodyH tml = True
MailObj.Send(Em From.Text, EmTo.Text, EmSubj.Text, EmMsg.Text)
end if
End Sub
Thanks
Leslie