Recommended Links
Common For all pages
This section shows you how you can have editable content which is the same throughout the site ( NOTE: It is language specific ) .All the navs below are generated using snippets that are included with the framework, edit this content to see how it was generated
Sub Nav:
Main Nav:
Footer Nav:
Unique Per Page
Mailer
The 'Mailer' Class is a wrapper around the PHPMailer Library,
You can access the PHPMailer Object directly by using $mailer->getMailer()
See the API documentation at: http://phpmailer.worxware.com/
Example:
See the API documentation at: http://phpmailer.worxware.com/
Example:
//This is a function within a controller
public function Mailer()
{
//First include the Mailer.php wrapper class file
require_once '/libs/standalone/Mailer.php';
//Set the From Address and From Name that the mailer will use
$fromAddress = 'webmaster@test.com';
$fromName = 'webmaster';
//Create and instance of the Mailer Class
//passing the from address and from name
$mailer = new Mailer($fromAddress, $fromName);
//Create an associative array of 'To' addresses
//The Key is the name and the value is the email address
$toAddresses = array();
$toAddresses['Name'] = 'webmaster1@test.com';
//Optionally Create an associative array of 'CC' addresses
//The Key is the name and the value is the email address
$ccAddresses = array();
$ccAddresses['Name'] = 'webmaster2@test.com';
//Optionally Create an associative array of 'BCC' addresses
//The Key is the name and the value is the email address
//NOTE: The 'Key' is not needed, ince its BCC.
$bccAddresses = array();
$bccAddresses[] = 'webmaster3@test.com';
//We then set the addresses
//NOTE: the $ccAddresses and the $bccAddresses arguments
//are optional
$mailer->setAddresses( $toAddresses, $ccAddresses, $bccAddresses );
//Next we set the subject for the email
$mailer->setSubject( 'This is a test subject' );
//Here we set the actual message of the email
$mailer->setMessage( 'This is a test message' );
//Optionally we can attach files by passing an array of
//file locations relative to the root
$mailer->attachFiles( array('temp/index.html') );
//And finally we send the email, you can print the
//$result to check the status.
$result = $mailer->send();
}