HTML Email messages
This class was developed as a solution for generating HTML email messages in a REALbasic application. As such it, includes an HTMLEmailMessage function which returns an RB EmailMessage class instance with its BodyHTML property set to the HTML representation of your styled text, as well as a number of additional adjustments to display properly in a wide variety of email viewers/clients. You can then use it like any other normal EmailMessage instance.

Note that some features of normal HTML rendering do not work properly in HTML emails. In particular, the background image property is not handled properly by some email clients in our experience.

An excellent summary of what's available in different email clients and viewers can be found at the CampaignMonitor Web site.

Plain text and subject encoding
The EmailMessage class instance that PWStyleHTMLField's HTMLEmailMessage function returns has its encoding set to Quoted-Printable in order to be properly by some email clients that require strict adherance to specifications. If for some reason you do not want to include encoded text, you can replace the BodyPlainText property with the plain text you would like to be sent.

Subject lines that have non-ASCII characters need to be encoded. There are different encoding schemes that can be used. The demo project includes a ConvertSubjectToQuotedPrintable function that performs this conversion. You can replace this function with one of your own choice if you would like.