Table of Contents
StatusDraft
Todofill in connect, fuller description, expand configuration

Email Helper

An Email helper to work with the Swift email library.

Configuration

The swiftmailer configuration for this helper is found in config/email.php

Inside the config/email.php file you can select the driver type which are native, sendmail, smtp

Example: using smtp

$config['driver'] = 'smtp';
 
$config['options'] = array('hostname'=>'yourhostname', 'username'=>'yourusername', 'password'=>'yourpassword', 'port'=>'25');

Methods

connect()

send ()

'send' sends an e-mail using the specified information. The parameters are:

Example:

$to      = 'to@example.com';  // Address can also be array('to@example.com', 'Name')
$from    = 'from@example.com';
$subject = 'This is an example subject';
$message = 'This is an <strong>example</strong> message';
 
email::send($to, $from, $subject, $message, TRUE);
helpers/email.txt · Last modified: 2008/05/01 20:31 (external edit)