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.

Comments

alsiukola’s picture

Lovely, thanks.

alsiukola’s picture

Status: Active » Needs review
maartendeblock’s picture

Patch in #1 works for me. Thank you!

keyboardman’s picture

haggins’s picture

Status: Needs review » Reviewed & tested by the community

Works, thank you!

josesanmartin’s picture

Commited, thanks wmad and lduerig. Have a wonderful new year! :)

josesanmartin’s picture

Issue summary: View changes
Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

kohinur’s picture

patch #1 really works thanks