Overview

Namespaces

  • Core
    • Auth
    • Exceptions
    • Helpers
    • Providers
  • Kernel
    • Dispatch
    • Providers
  • None
  • Vendor
    • ExampleVendor

Classes

  • Logger
  • Mailer
  • Mailer_PHP
  • Overview
  • Namespace
  • Class
  • Download

Class Mailer

Send an email using Mandrillapp. Set the <key> from /app/config/config.ini

Namespace: Kernel\Dispatch
Package: Kernel
Url: http://mandrillapp.com
Located at app/Kernel/Dispatch/Mailer.php
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

Kernel\Dispatch\Mailer
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.

#
Ribosome API documentation generated by ApiGen