Mail from iSeries with attachment

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

+4
source share
4 answers

There are two main ways to do this.

  • Do-It-Yourselfer will use the QtmmSendMail API
  • Otherwise, you can use several other free and purchased products. I would recommend:
    • MAILTOOL - Currently $ 399. Depending on what you are trying to do, I would recommend SplTool Suite if you want to email spool files.
    • RPGMail - A Free API Using JavaMail
+5
source

You can create your own program using Java and the JavaMail API .

+3
source

Where I work, we use MMAIL: http://www.easy400.net/mmail/start

It is free and provides easy-to-use teams. For example, I accidentally receive email flow files (in CLP):

  MMAIL / EMLSTMF SUBJECT ('Monthly Sales Reports') +
     FROMNAME ('AS / 400') FROMADDR (' as400@mycompany.com ') +
     TO (' jsmith@mycompany.com ' / Jim Smith / * TO +
        ' bjones@mycompany.com ' / Bob Jones / * CC) +
     STMF (& FILE1 & FILE2 & FILE3)

There are other options available (quite understandable if you use the interactive prompt) and several other commands to handle the most common use cases. The package also provides an API if you need finer control or need to send much more complex messages, but I never need more than the commands provided.

+3
source

I did not look at that time, but some unixy mail utilities should be installed on i5 / OS that QSH can use. If not, then perhaps just pass it on. Look at the ideas: http://www.shelldorado.com/articles/mailattachments.html

But I like the idea of ​​JavaMail better. Just a quick google gives a site with examples of using JavaMail: http://www.javaworld.com/javaworld/jw-10-2001/jw-1026-javamail.html

Using JavaMail, you can also read mail if this can also be useful.

Update . You say you can already add attachments from IFS. The CATSPLF command (part of the QSH utilities) can extract spool files and write them to standard output. This means that you can transfer spool files to IFS. But you have to know a lot about the work that created them.

how

  catsplf ...> / my / files / path
I found this at http://www.mcpressonline.com/tips-techniques/cl/techtip-read-printer-output-with-qshell.html . CATSPLF was introduced in V5R3.
+2
source

All Articles