Drop Shadow

HTML mails

If you want to send your message as an HTML mailing, use:

$message->setContentType('html');

The system will convert all text added using $message->paragraph() into HTML paragraphs.

Headlines

To add a headline, use:

$message->headline($line);

By default, the first headline is a level one headline (all-capitals in text mails). Subsequent headlines are level two headlines (title capitalization in text mails). You can force a particular level by adding the level number as the second parameter. For example, “$message->headline($line, 3)”.

Raw HTML

If you want to format the HTML yourself and then add it to your message, use addContent:

$message->addContent($text);

Any text added using addContent will be sent as-is, and will not be modified (except possibly to ensure that line lengths are not above the mail system’s maximum).

You can use addContent() in conjunction with paragraph() and headline(). Your paragraphs and headlines will be automatically formatted, and your pre-formatted HTML will be left alone.