Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

using JCL to email an attachment: email is not being sent

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
sushma rao

New User


Joined: 25 Mar 2009
Posts: 1
Location: Noida

PostPosted: Mon Mar 30, 2009 11:22 am    Post subject: using JCL to email an attachment: email is not being sent
Reply with quote

Hi,

I am trying to email an attachment using JCL. The job is ending with maxcc=0 but the email is not being sent.

My code:

//SENDMAIL EXEC PGM=IEBGENER
//SYSIN DD DUMMY
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD DISP=SHR,DSN=XXXX.FTPINP
// DD DISP=SHR,DSN=XXXX.OUTPUT
// DD DISP=SHR,DSN=XXXX.CLOSE
//SYSUT2 DD SYSOUT=(B,SMTP),LRECL=417

the DCB parameters of all the three files are RECFM=FB,LRECL=417,BLKSIZE=0

contents of XXXX.FTPINP:

HELO HOST
MAIL FROM: from_id
RCPT TO: to_id
DATA
FROM: from_id
TO : to_id
SUBJECT: REPORT for xxx
MIME-VERSION: 1.0
CONTENT-TYPE: MULTIPART/MIXED; BOUNDARY="MIMEBOUNDARY"
HI,

PLEASE FIND ATTACHED A REPORT.

REGARDS,
TEAM
--MIMEBOUNDARY
CONTENT-TYPE:TEXT/PLAIN; CHARSET="US-ASCII"
CONTENT-TYPE:APPLICATION/OCTET-STREAM; NAME="REPORT.CSV"
CONTENT-DISPOSITION: ATTACHMENT; FILENAME="REPORT.CSV"
CONTENT-TRANSFER-ENCODING: 7-BIT

XXX.OUTPUT is to be sent as attachment.

contents of XXXX.CLOSE :
--MIMEBOUNDARY

The mail is not being sent icon_sad.gif
What can be the error?

Thanks,
Sushma
Back to top
View user's profile Send private message

Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8055
Location: East Dubuque, Illinois, USA

PostPosted: Mon Mar 30, 2009 4:59 pm    Post subject:
Reply with quote

SMTP requires a line with nothing but a period at the end of the data. Without the period, SMTP doesn't recognize the end of the email and does not send it.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts EMAIL using IEBGENER - SMTP parasmalik20 JCL & VSAM 4 Tue May 23, 2017 12:19 am
No new posts Reading data from PS file and send it... rajatbagga All Other Mainframe Topics 18 Fri Sep 23, 2016 12:51 pm
No new posts How to send email with Rich Text usin... santhosh5983 JCL & VSAM 4 Fri Apr 08, 2016 2:30 am
No new posts Issue in sending zip file as mail att... ajithajt JCL & VSAM 8 Thu Apr 07, 2016 9:11 am
No new posts Email trigger through JCL Madhusudhan Prahlad JCL & VSAM 10 Mon Aug 31, 2015 3:43 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us