\EmogrifiedSmtpMailer
This is a simple extension of the built in SS email class that uses the PHPMailer library to send emails via SMTP and Emogifier to inline CSS.
Usage: (in mysite/_config.php)
Synopsis
class EmogrifiedSmtpMailer
extends SmtpMailer
{
- // members
- protected $cssfile;
- protected integer $SMTPDebug = 0;
- protected bool $logfailedemail = false;
- // Inherited members from SmtpMailer
- protected $host;
- protected $user;
- protected $pass;
- protected $charset;
- protected bool $tls;
- protected $port;
- protected $encryption;
- protected $smtpDebug;
- // methods
- public void __construct()
- public string getCSSfile()
- public $this setCSSfile()
- public integer getSMTPDebug()
- public $this setSMTPDebug()
- public string getLogfailedemail()
- public $this setLogfailedemail()
- public bool sendHTML()
- // Inherited methods from SmtpMailer
- public void __construct()
- public $this; setHost()
- public string getHost()
- public $this; setCredentials()
- public $this setTls()
- public boolean getTls()
- public $this setPort()
- public int getPort()
- public $this setEncryption()
- public mixed getEncryption()
- public $this setCharset()
- public string getCharset()
- public $this setSMTPDebug()
- protected void initMailer()
- protected array splitName()
- protected void explodeList()
- protected void initEmail()
- public bool|array sendPlain()
- public bool checkMailError()
- public bool sendHTML()
Hierarchy
Extends
Tasks
Line | Task |
---|---|
149 | inlineimages |
438 | inlineimages |
Members
protected
Methods
public
- __construct() — creates and configures the mailer
- getCSSfile()
- getLogfailedemail()
- getSMTPDebug()
- sendHTML() — Send a multi-part HTML email with inlined CSS
- setCSSfile()
- setLogfailedemail()
- setSMTPDebug()
Inherited from SmtpMailer
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
- checkMailError()
- getCharset()
- getEncryption() — Get the encryption to use
- getHost() — Get the SMTP host
- getPort() — Get the server port
- getTls()
- sendHTML() — Send a multi-part HTML email.
- sendPlain() — Send a plain-text email.
- setCharset()
- setCredentials() — sets the username and password
- setEncryption() — Set the encryption to use. Either 'ssl', 'tls' or false
- setHost() — sets the smtp host
- setPort() — Set the server port
- setSMTPDebug()
- setTls()