|Some mail clients are capable of accepting mail message bodies formatted in HTML whereas some are capable of plain text only. As the sender, it is typically not feasible to know which client supports what content type. With SMTPmail, it is possible to set the mail body in both plain text and HTML so the appropriate content type will be used by the type each client supports.
There are two ways to do this:
- Setting both the HTMLText and BodyText properties
- Setting both the GetHtmlTextFromFile and GetPlainTextFromFile properties.
Set mailer = Server.CreateObject("SoftArtisans.SMTPmail")
mailer.HTMLText ="<b>This is</b> HTML content<br>"
mailer.BodyText = "I am plain text" & vbCRLF
Note: GetPlainTextFromFile and GetHtmlTextFromFile methods are not available in SMTPMail Free version.
It is not necessary to set the ContentType property. The content-type of mixed body type will be automatically set to multipart/alternative.