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);