View previous topic :: View next topic
|
Author |
Message |
sudib19
New User
Joined: 06 Feb 2007 Posts: 29 Location: Noida
|
|
|
|
Hi,
How do I email two FB Files in a single step using SMTP. XMITIP is not installed in our system. Currently the code that I have is as follows
Code: |
//SENDMAIL EXEC PGM=IEBGENER
//SYSIN DD DUMMY
//SYSUT1 DD DSN=XX.JJ(MAIL),DISP=SHR
// DD DSN=XX.ACCNTS,DISP=SHR
// DD DSN=XX.JJ(MAIL1),DISP=SHR
// DD DSN=XX.ACCNTS1,DISP=SHR
//SYSUT2 DD SYSOUT=(B,SMTP),DCB=(LRECL=137)
//SYSIN DD DUMMY
//SYSPRINT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
|
The contents of MAIL and MAIL1 are as follows
MAIL
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: MULTIPART/MIXED; BOUNDARY="SIMPLE BOUNDARY"
--SIMPLE BOUNDARY
CONTENT-TYPE: TEXT/PLAIN
CONTENT-TRANSFER-ENCODING: QUOTED-PRINTABLE
CONTENT-DISPOSITION: ATTACHMENT; FILENAME=ACCTS1.CSV
|
Thanks a lot for your help
Sudip Bhattacharya |
|
Back to top |
|
|
sudib19
New User
Joined: 06 Feb 2007 Posts: 29 Location: Noida
|
|
|
|
Just to give you a better idea as to what is happening now.
The entire content of ACCTS and ACCTS1 are coming in the CSV file and only one attachment is coming. The LRECL of the files and the control cards is 137.
Sorry for missing that out in my previous post.
Thanks
Sudip |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
This worked for me and generated two attachments:
Code: |
DATA
FROM: MAINFRAME@XXX.COM
TO: ROBERT.SAMPLE@XXX.COM
SUBJECT: TEST ATTACHMENT
MIME-VERSION: 1.0
CONTENT-TYPE: MULTIPART/MIXED; BOUNDARY="SIMPLE BOUNDARY"
--SIMPLE BOUNDARY
CONTENT-TYPE: TEXT/PLAIN
CONTENT-DISPOSITION: ATTACHMENT; FILENAME=EMAILATT.TXT
// DD DISP=SHR,DSN=TTSSRS0.JCL.CNTL(EMAILATT)
// DD *
--SIMPLE BOUNDARY
CONTENT-TYPE: TEXT/PLAIN
CONTENT-DISPOSITION: ATTACHMENT; FILENAME=EMAILTST.TXT
// DD DISP=SHR,DSN=TTSSRS0.JCL.CNTL(EMAILTST)
// DD *
--SIMPLE BOUNDARY
// DD DISP=SHR,DSN=TTSSRS0.JCL.CNTL(EMAILAT)
// |
I don't think you have enough boundaries. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
I was missing the first --SIMPLE BOUNDARY on my first test job, and got the same results you did -- one attachment with everything in it. |
|
Back to top |
|
|
|