I explain clearly the problem: My file .php does two things: 1) Creates a pdf (verified already, that is stored in the variable $pdf) and 2)Sends an email using phpMailer.
What the problem?: The file $pdf I can send with $mail->AddAttachment
, since $pdf has not had its encode. For which I did the following:
$pdfdoc = $pdf->Output("", "S");
$pdflisto = chunk_split(base64_encode($pdfdoc));
By having a "course" $pdflisto I try to send by:
$mail->AddAttachment($pdflisto, "Cliente.pdf");
But, despite of that comes the email, no attachment.
What I need to know or what do I need help?
What error I am committing, in either the encode or the addAttachment, that through phpMailer does not come with the attachment?