createPDF and attach to mail script

4 posts by 2 authors in: Forums > CMS Builder: Plugins & Add-ons
Last Post: July 27, 2011   (RSS)

Re: [rjbathgate] createPDF and attach to mail script

By Toledoh - July 27, 2011

Re: [Toledoh] createPDF and attach to mail script

By rjbathgate - July 27, 2011

Re: [rjbathgate] createPDF and attach to mail script

By rjbathgate - July 27, 2011 - edited: July 27, 2011

EDIT

Got it working attaching both a pdf generated on the fly and an uploaded file via form.

if (is_uploaded_file(@$coverletter)) {
$fileb = fopen($coverletter,"rb");
$datab = fread($fileb,filesize($coverletter));
fclose($fileb);
}


sendMessage(array(
'from' => $EmailFrom,
'to' => $EmailTo,
'subject' => $Subject,
'text' => $Body,
'attachments' => array(
$cv_name => $data,
$coverletter_name => $datab
)
));


Thanks!