Attachment Corruption in Outlook - Need FIX Hi All, After much head scratching (and support from the guys at Kayako), I have arrived at a much needed fix for a problem I was seeing. The issue we have now resolved concerned new tickets which happened to have attachments. They worked fine when accessed through the helpdesk system (Staff interface), but when our Coordinator forwarded out the ticket, the attachments would come through on Outlook (2003, 2007 and 2010) as totally corrupt. Kayako support helped establish it was an Outlook based problem since it worked fine with Gmail, so after that we were on our own! After some searching, we decided it might be related to XMailer and had a good search around their forums. This was the result and indeed the fix XPertMailer Forum Hope this helps someone else too Scravid
Hmm, update on this. Changing the MLEN constant seems to have broken some other emails from the system. I had to switch it back. Anyone at Kayako got a fix for this? I don't think we'll get anything from Xmailler since it looks ancient.
Bumping this. I have the same problem and kayako need's to investigate their base64 encoding of attachments asap! Other clients might be more forgiving of the encoding than outlook!
On line 30 in __swift/thirdparty/XPM/PHP5/MIME5.php Max body line length should be set to 76 and not 70. According to base64 standard's max length is 76, so I don't know why kayako has set this to 70. I've even tried to get this info from kayako support without any proper response since they claim it's a outlook/exchange problem. ref: http://en.wikipedia.org/wiki/Base64 Look for: Base64 transfer encoding for MIME(RFC 2045) -> Max line length. FYI.. After changing the above MLEN to 76 all attachments sent from kayako are OK.
Checked the changelog, guessing they changed the setting in version .199 ryanlederman 199 21 March 2011 10:53 PM-- Parser - SWIFT-1192: MIME headers of outgoing email are corrupt or mail does not get delivered at all M: /trunk/__swift/thirdparty/XPM/PHP5/MAIL5.php M: /trunk/__swift/thirdparty/XPM/PHP5/MIME5.php
I compared the file with MIME5.php from version 4.1.176, and this file is also set with the wrong setting: class MIME5 { const LE = "\r\n"; const HLEN = 52; /** * --------------------------------------------- * [MODIFICATION]: Fix for Corrupt Attachments Issue [Varun] * http://www.xpertmailer.com/forum/viewtopic.php?p=113&highlight=&sid=d7767a569fd0d543737bc622ed2510a1 * http://www.xpertmailer.com/forum/se...rostfire&sid=89a9fb1bd1c65e4744f66dc60f3424dd * --------------------------------------------- */ const MLEN = 72; const HCHARSET = 'utf-8'; const MCHARSET = 'us-ascii'; const HENCDEF = 'quoted-printable'; const MENCDEF = 'quoted-printable'; static public $hencarr = array('quoted-printable' => '', 'base64' => ''); static public $mencarr = array('7bit' => '', '8bit' => '', 'quoted-printable' => '', 'base64' => '', 'binary' => ''); I wonder why I didnt get this error in version 4.1.176 when the setting is wrong....
As I said I haven't gotten any response as to why Kayako have set this MLEN variable to 70, so to set this value to 76 is at your own risk, but so far it has been working flawlessly. Maybe someone at kayako can comment this thread and clarify?
Nice one! Just found this was happening again and changed my MLEN to 76. That looks to have sorted it nicely. Thanks all.
This would be nice, maybe changing the setting might cause problems. Haven't noticed them so far however
I saw in version 4.01.240 the problem is still not fixed. any feedback from kayako regarding this bug? thx
Sorry, I posted that in the wrong thread. It may not yet be fully resolved in the latest version. I'll check it out and update you
hmmm - ok so we still have to fix after upgrade with "On line 30 in __swift/thirdparty/XPM/PHP5/MIME5.php Max body line length should be set to 76 and not 70."
A quick search gives out: if (0 >= $maxLineLength || 76 < $maxLineLength) { $maxLineLength = 76; from __swift\thirdparty\SwiftMailer\classes\SwiftMailer\Encoder\Base64Encoder.php Does anyone have this problem in .649?