Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Sending mails via SMTP (smtp_mailengine) produce corrupted attachments.
smtp_drupal_mail_wrapper expect to have full path filenames in Content-Disposition filename property, because while processing mail message, it reload attachments, if full path filename is not specified it consider it as "application/octet-stream".
patch to mimemail.inc attached
I verified this problem sending mails throught webform.
Comment | File | Size | Author |
---|---|---|---|
#2 | 1391736-mimemail_corrupted_attachment-2.patch | 711 bytes | afox |
mimemail.patch | 453 bytes | simone.girlanda | |
Comments
Comment #1
sgabe CreditAttribution: sgabe commentedThe patch doesn't apply and doesn't work with the development snapshot.
Comment #2
afox CreditAttribution: afox commentedI can verify that this bug exists and the provided patch fixes the issue with webforms at least. I attached the patch in correct format. However this doesn't solve the problem as a whole.
For instance, I'm creating a pdf file dynamically from an Ubercart invoice and this patch doesn't fix it. Although I'm setting the attachment mimetype as "application/pdf", it gets reset as "application/octet-stream". My issue is likely related to this one, but the solution is different. I will look into this, but would appreciate the help if anyone has an idea.
Comment #3
enggajb CreditAttribution: enggajb commented"mimemail.patch" works fine with me. It saved my life. Thank you.
Comment #4
sgabe CreditAttribution: sgabe commentedPlease, don't change the status. It will be fixed only when the patch is committed. As I see the second patch is the same. I tested this with the latest development snapshots and it didn't solve the issue.
Comment #5
afox CreditAttribution: afox commentedOk, the real issue seemed to be located at the SMTP module. The patch attached in http://drupal.org/node/1189940#comment-4630090 solved the issue.
The patches included in this issue shouldn't be applied. Marking as duplicate of #1189940: Corrupted attachments.
Comment #6
sgabe CreditAttribution: sgabe commentedMoving this to the right place.