email attachment from mainframe

1 post / 0 new
Anonymous
email attachment from mainframe

Following JCL can be used to send attachment in mail using mainframe

 

//STEP1    EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=*
//SYSIN    DD DUMMY
//SYSOUT   DD SYSOUT=*
//SYSUDUMP DD SYSOUT=D
//SYSUT2   DD SYSOUT=(B,SMTP)
//SYSUT1   DD DSN=USERID.MAIL.FILE,DISP=SHR
//         DD DSN=USERID.MAIL.ATTACH,DISP=SHR

 


CONTENTS OF USERID.MAIL.FILE

HELO FIRSTNAME
MAIL FROM: <>
RCPT TO: <>
DATA
FROM: NAME OF PERSON
TO: <>
CC: <>
SUBJECT: REPORT FILES ATTACHED
MIME-VERSION: 1.0
CONTENT-TYPE: TEXT/PLAIN; NAME="TEST.TXT"
CONTENT-DISPOSITION: ATTACHMENT; FILENAME="TEST.TXT"

CONTENTS OF USERID.MAIL.ATTACH

DATA IN THE ATTACHMENT FILE
DATA IN THE ATTACHMENT FILE
DATA IN THE ATTACHMENT FILE
DATA IN THE ATTACHMENT FILE
DATA IN THE ATTACHMENT FILE
DATA IN THE ATTACHMENT FILE

Sponsored Listing