sushma rao
New User
Joined: 25 Mar 2009 Posts: 1 Location: Noida
|
|
|
|
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
What can be the error?
Thanks,
Sushma |
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
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. |
|