i am using the excellent OpenSmtp codes in my VB.NET project, and encountered the same issue when sending HTML messages. I found a workaround that worked for me :
Hi,
thank you so much for your answer!
Unforunately what U suggested didn't solve my problem!
I have an html text string (e.g:"<b>hello</b>") and even if I replace the Chr(10) character as you say I still see html tags in the received mail..
Maybe you can send me an example of your mail html content so I can find out what's wrong with mine.
Thanks,
Silvia
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi, first of all I would like to thank U for your great work!
It's just what I was looking for!
Now, I' ve just tried the latest release and I got a problem.
When I assign a string value to HtmlBody property of the MailMessage object, like this:
objmail.HtmlBody="<html><head><title>New Document</title><meta http-equiv='Content-Type' content='text/html; charset=utf-8'></head><body><p>testo di prova</p></body></html>"
Mail is successfully sent but when I open the received mail the content is exactly the same:
<html><head><title>New Document</title><meta http-equiv='Content-Type' content='text/html; charset=utf-8'></head><body><p>testo di prova</p></body></html>
Instead I should see text in formatted Html, without any tag!
Can U help me?
Thanks in advance,
Sil
Hello,
i am using the excellent OpenSmtp codes in my VB.NET project, and encountered the same issue when sending HTML messages. I found a workaround that worked for me :
Dim anEmail As New MailMessage
...
...
anEmail.HtmlBody = Me.txtMailMessage.Text.Replace(Chr(10), "")
Subsequently the emails with Html contents sent out perfectly.
Regards,
MH
Hi,
thank you so much for your answer!
Unforunately what U suggested didn't solve my problem!
I have an html text string (e.g:"<b>hello</b>") and even if I replace the Chr(10) character as you say I still see html tags in the received mail..
Maybe you can send me an example of your mail html content so I can find out what's wrong with mine.
Thanks,
Silvia