带有内嵌图像和pdf附件的phpmailer电子邮件

I'm working with the phpmailer library and it works like a charm. Although one thing is nog going correct and was wondering if anyone could help me with it.

I've got an email template with two inline embedded images. Sending the mail works perfectly, and the images are being displayed and attached. This is the code:

$mail = new PHPMailer(true); //defaults to using php "mail()"; the true param means it will throw exceptions on errors, which we need to catch

try {
 $mail->IsHTML(true);
 $mail->AddAddress($a);
 $mail->Subject = $s;

 $mail->AddEmbeddedImage(PATH . '_mail/mail_cursus.jpg', 'kop', 'mail_cursus.jpg');
 $mail->AddEmbeddedImage(PATH . '_mail/mail_logo.jpg', 'logo', 'logo.jpg');


 $m = file_get_contents(PATH . '_mail/mail_basis.html');
 $m = str_replace('[[bodyTekst]]',$body, $m);

 $mail->Body = $m;
 $mail->Send();


} catch (phpmailerException $e) {
    zis_log($e->errorMessage());
    return $e->errorMessage(); //Pretty error messages from PHPMailer
} catch (Exception $e) {
    zis_log($e->getMessage());
    return $e->getMessage(); //Boring error messages from anything else!
}

But when I add $mail->AddAttachment(PATH . '_mail/Conditions.pdf') the pdf doesn't get attached. It doesn't throw an exception, and the mail is just being send. Even giving the optional parameters doesn't seems to do the trick.

How can I attach a PDF file and the two embedded images?

I found this patch: http://sourceforge.net/tracker/index.php?func=detail&aid=3151482&group_id=26031&atid=385707

Which should solve the "problem". In the meanwhile I'm migrating to swift mailer; which turns out to have some nice features i missed in phpmailer like the logging option and 'flood' control.

I've got the same problem here. Which email client are you trying to use? I noticed that with webmail (RoudCube), Gmail webmail, Outlook 2011 Mac and Lotus Notes 8 the embedded images are shown correctly and all the attachments are also shown properly. Apparently, the problem happens with Apple Mail and Thunderbird. With the two latter clients I tried to open the Raw Message Source and I can see all the attachments properly. But the email appears to have no attachments at all (except embedded images of course).

Thanks for the help, best regards.