My emails are being sent properly, but each attachment is sent twice. The root cause (bug perhaps) is that in smtp.mail.inc
$mailer->AddAttachment is called on line 432, and $mailer->AddStringAttachment is called on line 449 when mimemail is used. I solved the issue by modifying line 404 as such:
elseif ( strpos($body_part, 'Content-Disposition: attachment;') && !isset($message['params']['attachments']) ) {
since mimemail attachments are handled in the block on line 446.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | smtp-duplicate-attachments-mimemail-1988482-1.patch | 768 bytes | alsiukola |
Comments
Comment #1
alsiukola commentedLovely, thanks.
Comment #2
alsiukola commentedComment #3
maartendeblock commentedPatch in #1 works for me. Thank you!
Comment #4
keyboardman commented#1: smtp-duplicate-attachments-mimemail-1988482-1.patch queued for re-testing.
Comment #5
haggins commentedWorks, thank you!
Comment #6
josesanmartin commentedCommited, thanks wmad and lduerig. Have a wonderful new year! :)
Comment #7
josesanmartin commentedComment #9
kohinur commentedpatch #1 really works thanks