Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 8198
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 Rexx to send an email without SMTP Se... upendrasri All Other Mainframe Topics 12 Sun Nov 19, 2017 7:59 pm
No new posts sending email from jcl using the mail... niloyarp JCL & VSAM 5 Tue Oct 10, 2017 12:32 pm
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

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us