Calling the SMTPSEND2 Command from Net.Data Scripts or CL Programs

You can call the SMTPSEND2 command from a Net.Data web macro to send email. The following RPG and CL programs illustrate how to call the SMTPSEND2 command. The call to the RPG program can then be tapped into a Net.Data macro to call the program from a web browser.

The following RPGLE program calls SMTPSEND2 and will accomodate up to 5 To, CC, or BCC addresses and 1 attachment file. You can easily modify this program to allow for multiple attachments as well.