\EmogrifiedMailer
This is a simple extension of the built in SS email class that uses the PHPMailer library to send emails via mail() and Emogifier to inline CSS.
Usage: (in mysite/_config.php)
Synopsis
class EmogrifiedMailer
extends Mailer
{
- // methods
- public void __construct()
- public $this setCharset()
- public string getCharset()
- public string getCSSfile()
- public $this setCSSfile()
- protected void initMailer()
- protected void initEmail()
- protected array splitName()
- protected void explodeList()
- public bool sendPlain()
- public bool sendHTML()
Hierarchy
Extends
- Mailer
Tasks
Line | Task |
---|---|
233 | inlineimages |
Members
protected
- $charset — string
- $cssfile
—
string
CSS file containing classes to inline into the email's HTML
Methods
protected
- explodeList() — takes a list of emails, splits out the name and calls the given function. meant to be used with AddAddress, AddBcc and AddCc
- initEmail() — shared setup for both html and plain
- initMailer() — creates a new phpmailer object
- splitName() — takes an email with or without a name and returns email and name as separate parts
public
- __construct() — creates and configures the mailer
- getCSSfile()
- getCharset()
- sendHTML() — Send a multi-part HTML email with inlined CSS
- sendPlain() — Send a plain-text email.
- setCSSfile()
- setCharset()