how to send an attatchment with email
Posted: Fri Mar 11, 2016 3:07 am
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.
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.