At 18:00 -0800 on 01/17/2011, John Mattson wrote about EMail attachments stopped working:

So, our first PS 80 dataset contains something like this...
HELO EAI1.EPSON.COM
MAIL FROM:<[email protected]>
RCPT TO:<[email protected]>
DATA
FROM:  [email protected]
TO:    [email protected]
SUBJECT: (TEST) Sku Download Exception
Mime-Version: 1.0
Content-Type: txt/plain; name="SKUEXP110117.TXT"
Content-Disposition: attachment; filename="SKUEXP110117.TXT"

I am be incorrect but the DATA Statement needs to be the LAST header (ie: After the Content-Disposition: Header in this case).

You are also missing MIME Separators. There needs to be a boundary="SOME-TEXT-STRING on the Content-Type header. ie:

 Content-Type: txt/plain; name="SKUEXP110117.TXT"; boundary="SOME-TEXT-STRING"

You also need to wrap your data in separators like this:

The Second containing looks like

--SOME-TEXT-STRING
xxxx, yyyy, zzz, etc
--SOME-TEXT-STRING--

The system is choking on the malformed message. Note that the SOME-TEXT-STRING can be anything that does not occur in your data. It is proceeded in the data by -- and the last section is the string prefixed and suffixed by -- (as I showed). It also has to be separate lines. The formatting is more complex than I showed but for a single attachment, the above will work. If you want to send more than one attachment, contact me offline or ask here and I will give you the correct structure.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to