Basic Usage

Jadu's service container has a getMail method which provides you with an instance of Jadu_Service_Mail. This does the heavy lifting for you if your application is configured correctly.

$mail = Jadu_Service_Container::getInstance()->getMail();

Mail container (basic)

The send method within the Jadu_Service_Mail class expects an instance of Jadu_Container_Mail which allows holds all of the necassary data

$data = new Jadu_Container_Mail(
    'Hello World!',
    'Welcome to'

HTML emails


Adding an attachment

$data->addAttachment('/path/to/file.ext', 'file-name.ext');

Or add multiple attachments passing an array

    '/path/to/first/file.ext' => 'file-name-1.ext',
    '/path/to/second/file.ext' => 'file-name-2.ext',

Carbon Copy (CC)

$data->addCc($email, $name);

Blind Carbon Copy (BCC)

$data->addBcc($email, $name);


$data->addReplyTo($email, $name);

Sending the email


results matching ""

    No results matching ""