Hello,
I am trying to email an attachment from mainframe using IEBGENER. My JCL is:
//MAILPROC EXEC PGM=IEBGENER
//SYSABEND DD SYSOUT=*
//SYSTOTAL DD SYSOUT=*
//SYSLIST DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSUT2 DD SYSOUT=(A,SMTP)
//SYSIN DD DUMMY
//*
//SYSUT1 DD DSN=USERID.INPUT.CARDS,DISP=SHR
// DD DSN=USERID.DCOL.DATASETS,DISP=SHR
Content of USERID.INPUT.CARDS is as below:
HELO MAILST1
MAIL FROM: <NAME@COMPANY.COM>
RCPT TO: <NAME@COMPANY.COM>
DATA
FROM: <NAME@COMPANY.COM>
TO: <NAME@COMPANY.COM>
SUBJECT: TEST ATTACHMENT
MIME-VERSION: 1.0
CONTENT-DISPOSITION:ATTACHMENT;FILENAME="TEXT_FILE.TXT"
CONTENT-TYPE: TEXT/PLAIN
This JCL is working well, but if I put some text in the body of the USERID.INPUT.CARDS, I don't get the attachment, instead I get the attachment text in the body of the email.
Any help on getting this work, please?
Thanks,
Srini