View previous topic :: View next topic
|
Author |
Message |
chandan.inst
Active User
Joined: 03 Nov 2005 Posts: 275 Location: Mumbai
|
|
|
|
Hi All,
I tried searching this forum to get this query resolved but I am not able to get correct answer
I apologize in advance if this a repetitive post
I am trying to send email with attachment through JCL and it working fine the only issue is first line from the dataset is missing in attachment.
if I repeat the same same line twice in input dataset then I am getting only one line
Below is the JCL and header file I am using
JCL
Code: |
//MAILSTEP EXEC PGM=IEBGENER
//SYSABEND DD SYSOUT=*
//SYSTOTAL DD SYSOUT=*
//SYSLIST DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSUT2 DD SYSOUT=(B,SMTP)
//SYSIN DD DUMMY
//SYSUT1 DD DISP=SHR,DSN=<Header File>
// DD DISP=SHR,DSN=<Attachment Data>
// DD DISP=SHR,DSN=<dot File> |
Header file
Code: |
HELO MVSHOST
MAIL FROM:<abc@xyz.com>
RCPT TO:<abc@xyz.com>
DATA
FROM: <abc@xyz.com>
TO:<abc@xyz.com>
SUBJECT: TEST
MIME-VERSION: 1.0
CONTENT-TYPE: MULTIPART/MIXED; BOUNDARY="SIMPLE BOUNDARY"
--SIMPLE BOUNDARY
CONTENT-TYPE: TEXT/PLAIN
This is for SMTP
--SIMPLE BOUNDARY
CONTENT-TYPE: TEXT/PLAIN
CONTENT-DISPOSITION: ATTACHMENT;FILENAME="SMTP.CSV" |
I am not able to figure out what I am missing here.
Kindly guide me on this
Regards,
Chandan |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Hi Chandan,
How are you!
In the "Header file", have a "Blank-line" after CONTENT DISPOSITION, as shown below, and try again
Code: |
HELO MVSHOST
MAIL FROM:<abc@xyz.com>
RCPT TO:<abc@xyz.com>
DATA
FROM: <abc@xyz.com>
TO:<abc@xyz.com>
SUBJECT: TEST
MIME-VERSION: 1.0
CONTENT-TYPE: MULTIPART/MIXED; BOUNDARY="SIMPLE BOUNDARY"
--SIMPLE BOUNDARY
CONTENT-TYPE: TEXT/PLAIN
This is for SMTP
--SIMPLE BOUNDARY
CONTENT-TYPE: TEXT/PLAIN
CONTENT-DISPOSITION: ATTACHMENT;FILENAME="SMTP.CSV"
|
|
|
Back to top |
|
|
chandan.inst
Active User
Joined: 03 Nov 2005 Posts: 275 Location: Mumbai
|
|
|
|
Hi Anuj,
I am doing good. How are you?
Thanks and its working as expected.
I tried inserting a blank line earlier and some how it was not working. I must be missing something that time
Thanks again
Regards,
Chandan |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
SMTP parameters are quite sensitive - however, glad that you got it working! |
|
Back to top |
|
|
chandan.inst
Active User
Joined: 03 Nov 2005 Posts: 275 Location: Mumbai
|
|
|
|
yes Agree with you.. We need to be extra careful while working with SMTP |
|
Back to top |
|
|
|