Sending Email from PHP using Templates
Agile Toolkit bundles a powerful emailing class. However instead of focusing on adding SMTP support and related features (which are rarely used in live environment anyway) this class focuses on use of Mail Templates and simplifying email sending in general.
[php]
$mail=$this->add(‘TMail’);
$mail->loadTemplate(‘test-mail’);
$mail->setTag(‘name’,'John’);
$mail->setTag(‘product’,'VAC-293′);
$mail->setTag(‘link’,$this->api
->getDestinationURL(‘./register’,array(‘code’=>’123′))
->useAbsoluteURL());
$mail->send($email);
[/php]
See this code in action:


There are actually many other powerful features such as HTML templates. I’ll highlight them some other time.