I think I've figured this one out.
Line 451 of emailintegration.php is wrong. It has this:
PHP Code:
$filedata = base64_decode($attach['data']);
But this trashes the attachment data since mimeDecode has already done a base64 decode of the contents. This line always sets $filedata to 0 length for my attachments.
If I change it to
PHP Code:
$filedata = $attach['data'];
then attachments seem to work.
Scanning through the rest of the file, I see this comment ... perhaps the code on line 451 should check this variable and decode it conditionally.
PHP Code:
$mime_class = new Mail_mimeDecode;
// decodes attachments if true, turn off base64 in the files section below
$mime_class->_decode_bodies = true;