Sending Emails with attachment



JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

Sending Emails with attachment

Postby maragatham pp » Fri Jun 17, 2011 12:29 pm

Hi,

I have been able to send an email. But this time I have been asked to send a file as an attachement to the email.

The logic I applied is
1) created a file with Generic Email format with TO, SUBJECT and
Content-Disposition: attachment; filename="MISMATCH_RPT.txt".
2) concatenated the above to the actual Mainframe file( which needs to be sent as attachment).
3) The concatenated file was SMTP'd.

Although I received an Email, the contents of the file were displayed on the email and was not sent as an attachement.

Kindly revert if I have to provide any further info to resolve this.
maragatham pp
 
Posts: 19
Joined: Fri May 20, 2011 12:44 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Sending Emails with attachment from Mainframe

Postby NicC » Fri Jun 17, 2011 2:47 pm

Did you search the forum first - that is one of the rules. Another rule is to state what you have tried but as you have not stated anything perhaps you have not tried any diagnosis at all so why should we do it for you. Your lucky day: try this post found by a simple search of the JCL section of the forum using 'e-mail attachment' as the search key.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

Re: Sending Emails with attachment from Mainframe

Postby Robert Sample » Fri Jun 17, 2011 3:01 pm

Sending email with attachments from the mainframe is done at our site every day. It is not that hard, but SMTP is extremely sensitive to the nuances and if you don't have everything exactly right, the email (or attachment) is not sent. And as Nic said, if you want more assistance you are going to have to post the exact JCL you are using -- not a copy, not a retyping, the exact JCL cut and pasted using the Code tag to preserve spacing. Get rid of IP addresses and precise domain names, but leave everything else exactly the same.

Google is your friend. Google RFC 2822 or RFC 2821 to find out more about the email process, and follow some of the links in these standards to find out about attachments to emails.
Robert Sample
Global moderator
 
Posts: 3720
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times

Re: Sending Emails with attachment from Mainframe

Postby MrSpock » Fri Jun 17, 2011 3:08 pm

User avatar
MrSpock
Global moderator
 
Posts: 809
Joined: Wed Jun 06, 2007 9:37 pm
Location: Raleigh NC USA
Has thanked: 0 time
Been thanked: 4 times


Return to JCL

 


  • Related topics
    Replies
    Views
    Last post