a code for sending an email using the pop() module on Sahana Vesuvius:

global $global;

require_once($global['approot']."/mod/lpf/lib_lpf.inc");


// example save path: /tmp/2012_0402_17-50-33.454312___437849328789.pdf

$path = "/tmp/".date("Y_md_H-i-s.".getMicrotimeComponent())."___".mt_rand().".pdf";

file_put_contents($path, $base64contents);


$subject  = "...email subject here...";

$bodyHTML = "...html email msg body here...";

$bodyAlt = "...non html email msg body here...";

$p = new pop();

$p->sendMessage($senderAddress, "", $subject, $bodyHTML, $bodyAlt, $path);

http://pastebin.com/BHVNen9P


QR Code
QR Code agasti:vesuvius:gsoc2012:export:sending_mail (generated for current page)