Hello, I have big problem here. I need to create HTML email with images displayed in the body of the mail and I need to attach PDF document as normal file attachment.
This is easy by using phpMailers functions AddEmbeddedImage and addAttachment, but some emails clients do not show pdf (file) attachment if I use AddEmbeddedImage before/after..
Images in the body must works in offline too (I can not use external links to show images in the email body)...
Can somebody help? There is example of source code:
<?php
$mail = new phpmailer();
$mail->From = 'mail.mail@mailer.com';
$mail->Subject = 'PDF document';
$mail->IsHTML(true);
$mail->AddAddress('someone@mail.com');
$mail->AddAttachment('document.pdf','document.pdf',"base64","application/pdf");
$mail->AddEmbeddedImage("logo.gif","weblogo","weblogo.gif","base64","image/gif");
$mail->Body = "<table><tr><td>Ahoj blabal</td><td><img src='cid:weblogo'></td></tr></table>";
$mail->Send();
?>