Please enable JavaScript to view this site.

The Cobwebb Email exit programs can be used in the Email Output Device and are used mainly to retrieve destination information from a database on the IBM i. Sample programs may be found in either the USRTOOL [for RPG] or USRTOOLLE [for RPGLE] source file in the CPPD library - see entries where the Description is prefixed OUTD-EML. You can use CLLE (or CLP) as well but you must have all the correct parameters as defined below.

You may also output up to 19 additional email destinations in your Exit Program - for details see Adding Additional Email Destinations in your Email Exit Program.

Note: When creating an Email Exit Program you will need to add any required libraries (before you open the files) as the libraries added to your Cobwebb Design are not carried through to the Distribution program.

Step 1 - Create your Cobwebb Email Exit Program
Notes:
The first parameter will always be the Input string; all of the other parameters may be used to pass back information to your Cobwebb Design.
Remember to set the Error parameter to either 0 (or blank) for Success or 1 for Failure this is then passed back to the Cobwebb Server software to handle accordingly.

Step 2 - Test your Cobwebb Email Exit Program using the Cobwebb Test Harness for a File Exit Program TSTEPRM.

Step 3 - Test your PPD interactively.

oEnable Test Mode to write parameter details to the joblog.

oUse the RUNPPD command. Note: Make sure that you only have the libraries that existing in the SPLMON Job Description in your Library List (CPPD, QGPL, QTEMP by default) so if there are any missing libraries you will know and can add them to your Email Exit Program.

Program Parameters

Parameter

Attribute

Description

Input

A (256)

Input string - Destination Address element

RecEmail

A (256)

Recipient's email address

SndEmail

A (256)

Sender's email address

SndName

A (50)

Sender's name

RecName

A (50)

Recipient's name

Subject

A (256)

Email subject

Message

A (256)

Email message text

AttName

A (64)

Attachment Name

AttExt

A (3)

Attachment Extension

AttType

A (3)

Attachment Type