Hi all,
I did go through a number of pages and examples and also tried alot of examples for sending an attacthment, but no luck.
My requirement is i want to send a mail with attacthment.
below is the jcl i have used:-
//STEP01 EXEC PGM=IEBGENER
//SYSIN DD DUMMY
//SYSPRINT DD SYSOUT=*
//SYSUT2 DD SYSOUT=(B,SMTP)
//SYSUT1 DD DSN=abc.report,
// DISP=SHR
// DD DSN=abc.mail.file,
// DISP=SHR
/*
abc.report
*****************************
HELO name
MAIL FROM:<email-id>
RCPT TO:<email.id>
DATA
TO: email-id
FROM: email-id
SUBJECT: TEST MAIL
MIME-VERSION: 1.0
CONTENT-TYPE: TEXT/PLAIN
CONTENT-DISPOSITION: ATTACHMENT;
FILENAME=abc.mail.file.txt
abc.mail.file
************************************
This is the input file which contains information and I want this to be attacthed in the mail in .txt format
The abc.report and abc.mail.file are the fixed block PS files with 300 lrecl.
The issue i am facing is the job is going down with MAXCC 0 i.e no errors or abends, but i am not able to receive any mail nor the attacthment.
Could you please help me out with this.
Thank You in advance.
//MAILPROC EXEC PGM=IEBGENER
//SYSABEND DD SYSOUT=*
//SYSTOTAL DD SYSOUT=*
//SYSLIST DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSUT2 DD SYSOUT=(9,SMTP)
//SYSIN DD DUMMY
//*
//SYSUT1 DD *
HELO MAINFRAME.XXX.COM
MAIL FROM: <MAINFRAME@XXX.COM>
RCPT TO: <ROBERT.SAMPLE@XXX.COM>
DATA
FROM: MAINFRAME@XXX.COM
TO: ROBERT.SAMPLE@XXX.COM
DATE: JANUARY 24, 2016
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)
//