Class Mailer
Send an email using Mandrillapp. Set the <key> from /app/config/config.ini
Methods summary
public static
Kernel\Dispatch\Mailer
|
#
singleton( )
Returns a Mailer instance, creating it if it did not exist.
Returns a Mailer instance, creating it if it did not exist.
Returns
|
public
boolean
|
#
sendEmail( mixed $to, string $subject, string $message, mixed $from = [], mixed $replyTo = '', mixed $bcc = '', array $files = array() )
Sends an email using the PHP function, but first setting the appropriate headers, content-types... and attached files.
Sends an email using the PHP function, but first setting the appropriate headers, content-types... and attached files.
Parameters
- $to
- Send it to whom? can be a string "john@example.com", an array('john@example.com', 'John Smith') or an array('Addresses' => array(array('john@example.com', 'John Smith'), 'peter@example.com', ....))
- $subject
- The message subject for the email
- $message
- The message body
- $from
- array('somebody@example.com', 'Foo Bar');
- $replyTo
- 'somebody@example.com'. The email address to reply to;
- $bcc
- 'im-secret@example.com'. The email address to bcc to;
- $files
- (default array() ) Array with the filenames of the desired files to attach.
Returns
boolean TRUE if sending was OK, FALSE otherwise. This does not mean the email will be delivered: it just means there was no error when sending it
Throws
Exception:Mandril_Error
Exception
Author
Nico Kupfer
|
Properties summary
public
Mandrill
|
$mail
A Mandrillapp instance, responsible of sending the email.
A Mandrillapp instance, responsible of sending the email.
|
|
protected
Core\Config
|
$config
The instance of the Config class.
The instance of the Config class.
|
|