Skip to main content  
  Easy400   |       IBM Systemi home   |   RSS feed
Public Source
Main utilities
5250 utility
Windows utility
Service program
Sample code
Examples of system API's
CGI support

MIME & Mail for IBM System i
Coding examples

The sources of the coding examples are available in the following source files:

The related objects are available in library MMAIL, while sample files are made available in library MMAILDATA. This allows you to use the samples as they are. Never change samples in library MMAIL, as they are refreshed in any subsequent MMAIL release.

If you need to replicate a sample in some library of yours, in order to customize it to your needs, you should not only copy and compile the related sources, but you should also populate your library with the MMAIL objects (service programs, etc.) needed for execution. This can be done through command SETCGILIB.

The following coding examples are available

  1. Sending a message to a distribution list
  2. Dynamic EML... command in a CL program

  1.   Sending a message to a distribution list
    This example allows to send to a given distribution list, documented in file DSTRLISTS, a text written on an IFS stream file, and optionally another stream file as attachment.
    The sender's data (name and e-mail) must be documented in file SENDERIDS.
    The program can sends a separate personal message to each addressee in the distribution list, or a single message to all the people in the distribution list, depending on parameter DSTTYPE in command MMAIL/EMLDST.

  2.   Dynamic EML... command in a CL program
    Many people are asking how to build and execute a MMAIL/EML... command in a CL program.
    See this example.