Subject: Writing HTML Emails
Date: 2020-10-07 11:43:20
From: Dean Samsig
Source: writing-html-emails
----------------------------------------------------------------------

I have been looking over the documentation but I have not been able to find any information about how to best write a HTML email.
What is the best practice for a HTML mail with this component?

The [`MailMessage`][1]'s [`BodyHtml`][2] property is barely documented, doesn't explain if you should also set the [`BodyText`][3] property at the same time or not.

Also what should the [`BodyText`][3] property be set to? Is there any easy method to convert a HTML body to a plaintext version? Is it maybe done automatically when I set the [`BodyHtml`][2] property?

Should I maybe just set the [`BodyText`][3] property to `"This is a HTML email."`?


  [1]: https://doc.componentpro.com/ComponentPro-Mail/ComponentPro-Net-Mail-MailMessage
  [2]: https://doc.componentpro.com/ComponentPro-Mail/ComponentPro-Net-Mail-MailMessage-BodyHtml
  [3]: https://doc.componentpro.com/ComponentPro-Mail/ComponentPro-Net-Mail-MailMessage-BodyText

----------------------------------------------------------------------

Note: This question has been asked on the Q&A forum of Thang Dang's fraudulent ComponentPro brand
If you purchased anything from ComponentPro, you have been scammed. Contact the payment processor
who sold you the license and ask for your money back.

Back to ComponentPro Q&A Forum Index