Code:
//SENDMAIL EXEC PGM=IEBGENER
//SYSIN DD DUMMY
//SYSUT1 DD DSN=CS.CI#J08.SASLIB3(BODYMAIL),DISP=SHR
// DD DSN=CS.CI#J08.PROP.SURVEY.ELEC.ACCNTS,DISP=SHR
// DD *
--SIMPLE BOUNDARY
// DD DSN=CS.CI#J08.SASLIB3(BDYMAIL),DISP=SHR
// DD *
--SIMPLE BOUNDARY
// DD DSN=CS.CI#J08.PROP.SURVEY.GAS.ACCNTS,DISP=SHR
//SYSUT2 DD SYSOUT=(B,SMTP)
//SYSIN DD DUMMY
//SYSPRINT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//
//SYSIN DD DUMMY
//SYSUT1 DD DSN=CS.CI#J08.SASLIB3(BODYMAIL),DISP=SHR
// DD DSN=CS.CI#J08.PROP.SURVEY.ELEC.ACCNTS,DISP=SHR
// DD *
--SIMPLE BOUNDARY
// DD DSN=CS.CI#J08.SASLIB3(BDYMAIL),DISP=SHR
// DD *
--SIMPLE BOUNDARY
// DD DSN=CS.CI#J08.PROP.SURVEY.GAS.ACCNTS,DISP=SHR
//SYSUT2 DD SYSOUT=(B,SMTP)
//SYSIN DD DUMMY
//SYSPRINT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//
The contents of MAIL and MAIL1 are as follows
Code:
HELO PRD370
MAIL FROM:<XX@XX.COM>
RCPT TO:<XX@YY.COM>
DATA
SUBJECT: Hello
TO:XX@YY.com
MIME-VERSION: 1.0
CONTENT-TYPE: MULTIPART/MIXED; BOUNDARY="SIMPLE BOUNDARY"
--SIMPLE BOUNDARY
CONTENT-TYPE: TEXT/PLAIN
CONTENT-TRANSFER-ENCODING: QUOTED-PRINTABLE
CONTENT-DISPOSITION: ATTACHMENT; FILENAME=ACCTS.CSV
MAIL1
Code:
MIME-VERSION: 1.0
CONTENT-TYPE: TEXT/PLAIN
---SIMPLE BOUNDARY
CONTENT-TRANSFER-ENCODING: QUOTED-PRINTABLE
CONTENT-DISPOSITION: ATTACHMENT; FILENAME=ACCTS1.CSV
This works for me and is generating two attachments. I am getting the data of first file in the first attachment correctly but the second attachment is coming blank. I am not getting any data in that.
I think I am missing some ---SIMPLE BOUNDARY or am having some fault in that.
Can anyone help me out.
Amit