View previous topic :: View next topic
|
Author |
Message |
vvmanyam
New User
Joined: 16 Apr 2008 Posts: 86 Location: Bangalore
|
|
|
|
Hi friends,
I use below step to email the user with the error report in the body of the email.
Code: |
//STEP100 EXEC PGM=IEBGENER
//*
//* SEND E-MAIL MESSAGE WITH THE ERROR REPORT
//*
//SYSIN DD DUMMY
//SYSUT1 DD DSN=TEST.EMAIL.ADDRESS,DISP=SHR
// DD DSN=TEST.EMAIL.CONTENT,DISP=SHR
//*OUTPUT
//SYSUT2 DD SYSOUT=(B,STPRSMTP)
|
TEST.EMAIL.CONTENT is the error report.
Details of TEST.EMAIL.ADDRESS:
Code: |
HELO ONCGHP4.TESTING.COM
MAIL FROM:<MAINFRAME@ONCGHP4>
RCPT TO:<TEST.EMAIL@US.TESTING.COM>
DATA
DATE:
SUBJECT: EXCEPTION REPORT FOR TESTING
|
But I want to send the email with the reprot as an attachment.
What changes should I make to do so?
Thanks,
Balu |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
Back to top |
|
|
vvmanyam
New User
Joined: 16 Apr 2008 Posts: 86 Location: Bangalore
|
|
|
|
Thanks for the link !!
I have tested that
But I am still receiving the email with file in the body of the mail but not as an attachment.
More over all these statements also in the email itself.
MIME-VERSION, CONTENT-TYPE TEXT/P, CONTENT-DISPOSITION, etc
Code: |
//SYSIN DD DUMMY
//SYSUT1 DD DSN=TEST.TRN.MAILSEND,DISP=SHR
// DD DSN=TEST.TRN.REPORT,DISP=SHR
// DD DSN=TEST.TRN.PERIOD,DISP=SHR
//*OUTPUT
//SYSUT2 DD SYSOUT=(B,STPRSMTP)
//SYSPRINT DD SYSOUT=*
|
Content:TEST.TRN.MAILSEND
Code: |
HELO ONCGHP4.TESTING.COM
MAIL FROM:<MAINFRAME@ONCGHP4>
RCPT TO:<TEST.EMAIL@US.TESTING.COM>
DATA
DATE:
SUBJECT: ERROR LOADING FUND TABLE
!!!PELASE FIND THE ATTACHED ERROR REPORT!!!!
MIME-VERSION: 1.0
CONTENT-TYPE: TEXT/PLAIN
CONTENT-DISPOSITION: ATTACHMENT; FILENAME=ERRORFILE.TXT
|
TEST.TRN.REPORT is my report.
What should be there in TEST.TRN.PERIOD?
I have put one '.'
Is that fine?
Please let me know if any error in the above steps.
Thanks,
Balu |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8697 Location: Dubuque, Iowa, USA
|
|
|
|
SMTP requires an email end with a period on a line by itself. That is what is supposed to be in TEST.TRN.PERIOD. If it's not showing up as you want, you may need to review (and possibly get a trace from) the STPRSMTP address space output. Depending upon your site, this may require site support group help. |
|
Back to top |
|
|
vvmanyam
New User
Joined: 16 Apr 2008 Posts: 86 Location: Bangalore
|
|
|
|
Thanks for the quick reply
But, I am sorry.I haven't got what you said!
Quote: |
SMTP requires an email end with a period on a line by itself. |
Will system automatically put a dot in to that dataset?
Quote: |
If it's not showing up as you want |
There is no attachment, every thing is in body itself.
What changes might help to get the report in attachment.
Thanks,
Balu[/code] |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8697 Location: Dubuque, Iowa, USA
|
|
|
|
Quote: |
Will system automatically put a dot in to that dataset? |
No, that's why you have to put one there. If it is not present, SMTP flat out refuses to send the email.
If you're not getting the attachment, you need to work with your site support group to trace the SMTP process and see what's going on from mainframe to mail server to mail client. |
|
Back to top |
|
|
|