Sending Mail from Phrameworks

by Castwide on 3-11-2008 • 2 comments

The following code demonstrates how to send an email in Phrameworks.


require_once(PHRAME_DIR . '/includes/phramemailer.class.php');
$mailer = new phrameMailer();
$mailer->Configure();
$mailer->IsHTML(true);
$mailer->AddAddress('recipient@somewhere.com');
$mailer->Subject = 'The subject';
$mailer->Body = 'The body';
$mailer->Send();

The Configure() function determines the mailing method and sets the sender address based on the settings defined in the SMTP options in the admin control panel.

Comments

The mailer method's been part of Phrameworks since when?
It's part of the kernel as of version 0.16.5.

Add Comment

Please log in or register if you would like to leave a comment.