MailerAdapter

Implements \MailerAdapterInterface

Class MailerAdapter

This class provides a communication layer with the external mailing library in order to isolate the library-specific code.

category

System

package

Email

Methods

Class Constructor

__construct(\PHPMailer\PHPMailer\PHPMailer $mailer, \TrueBV\Punycode $punycode, \BoolType $useHtmlMail = null) 

Arguments

$mailer

\PHPMailer\PHPMailer\PHPMailer

PHPMailer instance.

$punycode

\TrueBV\Punycode

Punycode encoder instance.

$useHtmlMail

\BoolType

Sends a single email.

send(\EmailInterface $email) 
Throws
\Exception

If mailer library fails to send the email.

Arguments

$email

\EmailInterface

Contains email information.

Properties

PHPMailer Instance

mailer : \PHPMailer\PHPMailer\PHPMailer
var

Type(s)

\PHPMailer\PHPMailer\PHPMailer

Used for punycode encoding.

punycode : \TrueBV\Punycode
var

Type(s)

\TrueBV\Punycode

useHtmlMail

useHtmlMail : boolean
var

Type(s)

boolean