Attach multiple PDF reports to a single email
search cancel

Attach multiple PDF reports to a single email

book

Article ID: 16645

calendar_today

Updated On:

Products

Spool

Issue/Introduction

When sending emails using the CA Spool SMTP driver it may be desirable to send multiple attachments in one only email when the files pertain to the same job and have the same destination.



Is there a way to send multiple file attachments in one email when using the SMTP driver?

Environment

z/OS

Resolution

Yes, this is possible. Use the parameter MAILCOMB in the DRIVPRMx statements. 

There are some options for the MAILCOMB keyword but I recommend that you use MAILCOMB=GROUPID. This option requires the general ESFPARM parameter XEQGRPID=JOBID to be set (requires a WARM start to implement). 

From the documentation: 

"MAILCOMB=FILENAME/GROUPID/USERID -- Sends an email with all queued files as attachments that have same the FILENAME, GROUPID or file creator’s USERID and have same TO=, CC= and BCC= email parameters. If XEQGRPID=JOBID and MAILCOMB=GROUPID are specified, all files created by a batch job with the same TO=, CC= and BCC= email parameters, are sent as one email with multiple file attachments." 

Example:

NODE   D2EA2PD,SMTP,GROUP=1,                                        

       X2YY=D2EVISIO,TRANSFRM=A2PDRKT,                               

       DRIVPRM1='TO=email-address',                                  

       DRIVPRM2='FROM=&UID',                                         

       DRIVPRM3='SUBJECT=&FNM - MAIL SENT BY &UID AS PDF ATTACHMENT',

       DRIVPRM4='MAILCOMB=GROUPID'                                   

 

Additional Information

CA Spool Customization - Email Print Driver