Sending Email from JCL



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

Sending Email from JCL

Postby Kaptan.singh » Wed May 05, 2010 1:21 pm

Hi frnds,

I have written a jcl to send email....... I tested it and its working fine

What if i want to send a attachment to the Email being send via jcl..... Is it possible :roll:
Please help me on this

Regards,
Kaptan
Kaptan.singh
 
Posts: 2
Joined: Wed May 05, 2010 12:28 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Sending Email from JCL

 

Re: Sending Email from JCL

Postby Robert Sample » Wed May 05, 2010 2:56 pm

What kind of attachment? Plain text? A file containing binary data? Something else?
Robert Sample
Global moderator
 
Posts: 3367
Joined: Sat Dec 19, 2009 8:32 pm
Location: East Dubuque, Illinois
Has thanked: 1 time
Been thanked: 222 times

Re: Sending Email from JCL

Postby Kaptan.singh » Wed May 05, 2010 3:07 pm

I want to attach a word document.....
(Also what if I want to attach something else. Is there different syntax for each type of attachment)
Kaptan.singh
 
Posts: 2
Joined: Wed May 05, 2010 12:28 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Sending Email from JCL

Postby Robert Sample » Wed May 05, 2010 4:45 pm

Since the mainframe does not do Word in any form, exactly how do you think you are going to attach the Word document on the mainframe?

A simple text attachment can be done by SMTP code of
HELO MAINFRAME.xxxxxxxx.COM
MAIL FROM: <MAINFRAME@xxxxxxxx.COM>
RCPT TO: <mail.name@xxxxxxxx.com>
DATA
From:     MAINFRAME@xxxxxxxx.com
To:      mail.name@xxxxxxxx.com
Subject:  Test attachment
MIME-Version: 1.0
Content-Type: text/plain
Content-Disposition: attachment; filename=file.txt
followed by the desired data to be the attachment. Content-Type must match the actual data or there can be side effects -- binary data,for example, will not successfully be transmitted as text/plain.

If you want to find out the different attachment types, Google is your friend. Googling content-type came back with 413,000,000 hits and some of them on the first page explain the whole MIME email concept quite well.
Robert Sample
Global moderator
 
Posts: 3367
Joined: Sat Dec 19, 2009 8:32 pm
Location: East Dubuque, Illinois
Has thanked: 1 time
Been thanked: 222 times


Return to JCL

 


  • Related topics
    Replies
    Views
    Last post