Attachment display errors

Using the attached, faxes are to rt as file attachments. The script
worked for rt2,
but fail for rt3. I get this from the logs

[warning]: Premature padding of base64 data at
/opt/rt3/lib/RT/Attachment_Overlay.pm line

The problem is that attachments in the database are not 'base64’
encoded. Why am I get this
error? All other tickets sent via email with attachments are displayed
as expected.

new_fax.sh (1.4 KB)