Menu

Html Body

Help
sil
2004-09-16
2013-04-15
  • sil

    sil - 2004-09-16

    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

     
    • virtuoso_cmh

      virtuoso_cmh - 2004-10-29

      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

       
      • sil

        sil - 2004-11-08

        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

         

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.