Emailing to multiusers



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

Emailing to multiusers

Postby pahi » Wed Jul 28, 2010 6:16 pm

Hi,

I’m using the below JCL to send the emails to multiple recipients, but I found that only one email ID receives that content of mail. For example in the case shown below, the first mail id receives a blank mail whereas the second id receives the right content. Similarly with multiple mail IDs in the list the last one receives the right format with all the previous ones receiving blank mails.

Is it possible to have multiple email ids receive same email content using the below file format by changing REXX?


//EMAILSUP EXEC PGM=IKJEFT01,COND=(4,LT),PARM='MULTIREX'
//SYSTSIN DD DUMMY
//SYSTSPRT DD SYSOUT=*
//SYSEXEC DD DSN=XXX.C.CLIST,DISP=SHR
// DD DSN=ABC.DEV.CLIST,DISP=SHR
//HEADER DD *
HELO TMVSK.TSL
MAIL FROM:<BBB@gmail.com>
RCPT TO:<CCC@gmail.com>
DATA
SUBJECT: Purchase Order Enquiry
MIME-VERSION: 1.0
CONTENT-TYPE: TEXT/HTML
//DETAILS DD DSN=TEST.MULTI.EMAIL,DISP=SHR
//TRAILER DD *
.
//HTML DD SYSOUT=(B,TCPSMTP)
//*TML DD SYSOUT=*
//*


file TEST.MULTI.EMAIL has the following email content

email: <aaa@GMAIL.COM>
email: <bbb@GMAIL.COM>
HI this is the email I wanted to send for aaa & bbb
end

email: <123@GMAIL.COM>
email: <456@GMAIL.COM>
email: <456@GMAIL.COM>
HI this is the email I wanted to send for 123 & 456 also 456
end


Regards,
Pahi
pahi
 
Posts: 27
Joined: Wed Apr 01, 2009 3:27 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Emailing to multiusers

Postby Robert Sample » Wed Jul 28, 2010 6:44 pm

You must have one RCPT TO: line for each email address to receive the email. Everything after the DATA may appear in various fields in the email (such as sender, CC:, etc) but does not affect the actual sender or actual recipients in any way.
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


Return to JCL

 


  • Related topics
    Replies
    Views
    Last post