Closed (duplicate)
Project:
Mime Mail
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
26 Apr 2011 at 09:28 UTC
Updated:
19 Jan 2012 at 13:09 UTC
H!
I'm using mimemail for sending mails with attachments but when i receive my mail, the attachment, a pdf file, seems to be broken or damaged...
On my server the files do are correct...
Does anybody knows what could be wrong?
Thx!
Comments
Comment #1
sgabe commentedPlease give us more details:
Comment #2
Joni Haeck commentedI just use php to generate the mail.
I the body of a page i type:
'
'
On my mac, when i try to open the attachment i received in the mail, it gives me an error saying the file is broken and could not be opened...
Comment #3
sgabe commentedThe correct MIME type for a PDF file is application/pdf.
Is the file encoded in the message? (Can you see it in the message source?)
Comment #4
Joni Haeck commentedI made the change but it still occurs...
I don't know how to see if the file is encoded in the message...
Comment #5
sgabe commentedYou can check it with a desktop mail client.
Comment #6
Joni Haeck commentedI'm using 'Mail' for mac... i can't find the source code...
Comment #7
Joni Haeck commentedOkay i did find it after all... It's in the Content-Disposition: attachment; filename="2011.pdf"
What now?
Comment #8
Joni Haeck commentedAnybody?
Comment #9
pgrond commentedWhat is wrong with the Content-Disposition? Is attachment not right?
I'm having also some problems with sending attachments. Gmail perfectly recognizes the attachment, but the iPad for example not.
Comment #10
RedHead commentedtry to add into webform.submissions.inc in 273:
$message['attachments'] = $attachments;
Comment #11
yesct commentedregarding #10, I think the new version, 3.12, of webform fixed the need for that hack by using $mail_params['attachments'] = $attachments;
(but I can't get it configured to send attachments... I'm looking for documentation on how to do that).
Comment #12
trevorbradley commentedI just hit this myself, using the rules module. (mimemail-1.0 here)
I've set my attachment as the following:
image/png:/var/www/sites/default/files/grinch_0.png
It's a simple image and is fine on the server before sending.
The png is corrupted if sent to either thunderbird or Outlook 2010. The filesize appears similar (differing by 21 bytes out of 720k) but looking at it with a hex editor it appears profoundly mangled...
Aha! Got it... the base64 is mangled:
Original, uncorrupted, from email source:
Corrupted file:
So the string "ContentTransferEncodingbase64" is somehow squeaking into the file data.
Investigating...
EDIT: This looks like a bug with the SMTP Authentication module: http://drupal.org/node/1189940
Comment #13
sgabe commentedThis seems to be a duplicate of #1391736: Corrupted attachment via SMTP.