My experience has been that multi-part MIME, which is what you want to use, works with SMTP on a z/OS system but is EXTREMELY sensitive to the format used (for example, you must use a BOUNDARY, you must put everyone for the first attachment together before starting the second attachment, and you must specify the data type correctly). What you have posted will not, under any circumstances, produce multiple attachments due to these deficiencies.
Commands I have successfully used in the past to send multiple attachments:
Code: Select all
HELO MAINFRAME.domain.com
MAIL FROM: <MAINFRAME@domain.COM>
RCPT TO: <ROBERT.SAMPLE@domain.COM>
DATA
FROM: MAINFRAME@domain.COM
TO: ROBERT.SAMPLE@domain.COM
DATE: OCTOBER 27, 2014
SUBJECT: TEST ATTACHMENT
MIME-VERSION: 1.0
CONTENT-TYPE: MULTIPART/MIXED; BOUNDARY="SIMPLE BOUNDARY"
--SIMPLE BOUNDARY
CONTENT-TYPE: TEXT/PLAIN
CONTENT-DISPOSITION: ATTACHMENT; FILENAME=EMAILATT.TXT
// DD DISP=SHR,DSN=TTSSRS0.JCL.CNTL(EMAILATT)
// DD *
--SIMPLE BOUNDARY
CONTENT-TYPE: TEXT/PLAIN
CONTENT-DISPOSITION: ATTACHMENT; FILENAME=EMAILTST.TXT
// DD DISP=SHR,DSN=TTSSRS0.JCL.CNTL(EMAILTST)
// DD *
--SIMPLE BOUNDARY--
// DD DISP=SHR,DSN=TTSSRS0.JCL.CNTL(EMAILAT)
//
As an example of the sensitivity, the blank lines after the CONTENT-DISPOSITION lines are NOT optional -- if you don't put a blank line, the email will not go out as you want.