This section shows a way to Email via a command call on the IBM i platform.
In this case this workflow has been setup:
Overview:
The workflow above can be called with this CL program:
PGM
DSPJOBLOG OUTPUT(*PRINT)
IFORMNG2/NG2CMD COMMAND(EMAIL) FILE(QPJOBLOG) +
SPLNBR(*LAST) ATTACHNAME(JOBLOG.PDF) +
MAILSERVER(GMAIL) SUBJECT('This is my +
email') +
MAILFROM('customremail@gmail.com') +
MAILTO('customremail@gmail.com')
ENDPGM
Some of the email settings in the workflow are fixed and some are variable and specified on the command. You can setup your own rules. In this example an input spooled file is merged with the fixed template, generic.ift and is sent with a variable subject and variable attachment name to and from email addresses, that are specified on the command.