I am trying to attach a pdf from our iseries system to an email as an attachment. I am able to send the email and the attachement . How ever the attachment(pdf) when I open it ... it is screwed up. Contains only part of the pdf and has some lines through the body going down the page. The pdf was out put of Eliteforms software ... has data with an overlay. Only the overlay is showing up. Does anyone have any code that I could compare mine with???
Software/Hardware used:
iseries
ASKED:
July 2, 2010 3:20 PM
UPDATED:
July 8, 2010 4:48 AM
What did you use for the MIME encoding of the attachment? And what did you supply as the MIME headers?
Tom
You have this line for your Content-Transfer-Encoding of the .PDF attachment:
Have you verified that the attachment file meets the criteria? If it contains characters not in the 7-bit ASCII character set or it has lines longer than 1000 characters (including the required CRLF pair for each line) or it has NULLs anywhere in it, you’ll have to encode it to some acceptable form and specify appropriate transfer encoding.
Open the .PDF file with DSPF and look at it in hex. Or use DMP to dump it in hex and search through the spooled output for invalid hex values.
Easiest test might be to use some basic client like Thunderbird to attach and send it to a test e-mail address. Then use Thunderbird to receive the e-mail and save the entire e-mail item into a file on a PC. Open that saved file in Notepad and look at how the MIME headers were built and what the successful attachment actually looked like.
I would first suspect that you have characters in the attachment that cannot be sent through SMTP without proper MIME encoding before attaching it.
SMTP only transfers 7-bit ASCII values, and only in a basic line format. If you attach anything, you have to ensure that it is in a format that SMTP handles and that the encoding type is one that is recognized by the client that will be receiving it. Base-64 encoding is one of the most widely recognized.
Tom