Email module for Kohana based on swiftmailer

Installs: 14

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 0

Open Issues: 0

Type:kohana-module

dev-3.3/master 2013-11-18 09:23 UTC

This package is not auto-updated.

Last update: 2024-09-24 07:01:50 UTC


README

Factory-based email class. This class is a simple wrapper around Swiftmailer.

Usage

Create new messages using the Email::factory($subject, $message, $mime_type) method.
Add recipients, add sender, send message:

$email = Email::factory('Hello, World', 'This is my body, it is nice.')
    ->to('person@example.com')
    ->from('you@example.com', 'My Name')
    ->send();        

You can also add HTML to your message:

$email->message('<p>This is <em>my</em> body, it is <strong>nice</strong>.</p>', 'text/html');

Additional recipients can be added using the to(), cc(), and bcc() methods.

Additional senders can be added using the from() and reply_to() methods.
If multiple sender addresses are specified, you need to set the actual sender of the message using the sender() method.
Set the bounce recipient by using the return_path() method.

To access the Swiftmailer message directly, use the raw_message() method.

Configuration

Configuration is stored in config/email.php. Options are dependant upon transport method used.

Consult the Swiftmailer documentation for options available to each transport.