Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mail from iSeries with attachment

Tags:

ibm-midrange

Is there a way to send an email from an iSeries terminal, adding an attachment from the IFS? I know how to send a normal email using the SNDDST utility.

like image 563
nearly_lunchtime Avatar asked Dec 07 '22 08:12

nearly_lunchtime


2 Answers

There is two main methods of doing this.

  1. The Do-It-Yourselfer will use QtmmSendMail API
  2. Otherwise there are several other free and purchased products that you could use. The ones I would recommend are:
    • MAILTOOL - Currently $399. Depending on what you are trying to do, I would recommend SplTool Suite if you want to email out spool files.
    • RPGMail - Free API making use of JavaMail
like image 81
Mike Wills Avatar answered Dec 30 '22 17:12

Mike Wills


Recent versions of the operating system come with the SNDSMTPEMM command already included. It's quite easy to use and allows you to include both a message body and an attachment simply by populating the appropriate parameters.

That is what I would recommend for anyone who has it on their system, and needs something simple and free. For more robustness, there is Brad Stone's MAILTOOL Plus, which is available as a paid subscription.

The below information is my original answer, slightly updated, mainly for historical purposes:


Where I work we use MMAIL. It's low-cost and provides easy-to-use commands. For example, I happen to e-mail stream files all the time as follows (within a CLP):

  MMAIL/EMLSTMF SUBJECT('Monthly Sales Reports') +
    FROMNAME('AS/400') FROMADDR('[email protected]') +
    TO('[email protected]'/Jim Smith/*TO +
       '[email protected]'/Bob Jones/*CC) +
    STMF(&FILE1 &FILE2 &FILE3)

There are other parameters available as well (pretty self-explanatory if you use the interactive prompt), and several other commands to handle the most common use cases. The package does also provide an API if you want finer control, or need to send much more complex messages, but I have never needed more than the provided commands.

This utility used to be free, but the author now requires a "donation" of $50 for full access to downloads from his site.

like image 23
John Y Avatar answered Dec 30 '22 15:12

John Y