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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

sgabe’s picture

Title: corrupted attachment » Corrupted attachment via SMTP
Version: 6.x-1.0 » 6.x-1.x-dev
Status: Active » Needs work
Issue tags: -smtp, -E-mail sending problem with webform

The patch doesn't apply and doesn't work with the development snapshot.

afox’s picture

Status: Needs work » Needs review
FileSize
711 bytes

I 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.

enggajb’s picture

Status: Needs review » Fixed

"mimemail.patch" works fine with me. It saved my life. Thank you.

sgabe’s picture

Status: Fixed » Needs work

Please, 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.

afox’s picture

Status: Needs work » Closed (duplicate)

Ok, 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.

sgabe’s picture

Project: Mime Mail » SMTP Authentication Support

Moving this to the right place.