Skip to main content  
  Easy400   |       IBM System i home   |   RSS feed
Freeware
 
Introduction
Main utilities
5250 utility
    Address Book
    Groups
    Create & Send MIME
    Select & Send MIME
    Work with MIME's
    Customized Letters
    Appendix A
Windows utility
Commands
Service program
Sample code
CGI support
FAQ
Bibliography
 
Download
 
 

 
Search   
Customized Letters

This utility provides also a way to send customized letters.
By "customized letter" we mean a MIME file including in the text some "output variables".
The idea is that a regular ILE-RPG program would read a database file (for instance a customer file) and - if some criteria are met - it would

  1. substitute variables in the MIME file
  2. send this "customized" MIME file to the appropriate e-mail.

Of course, to implement such a program, it takes

  • a "control file" (e.g. a customer file, including a contact name and e-mail for each customer record)
  • a MIME file containing substitution variables
  • some program logic, by which, if conditions are met, a subprocedure of our service program would be called to
    1. create a temporary copy of the MIME file, where each output variable is substituted with the proper value
    2. send the MIME file to the appropriate e-mail address

Command

mmail/custmail
provides a sample case, where
  • you make entries in a pseudo customer file
  • you run a sample program
    (member custmail in mmail/qrpglesrc)
    that takes advantage from some service program subprocedures to accomplish the job.
This is how you run it.

Figure 1- Updating the pseudo customer file

Before launching the program that will send customized letters, you've better to insert your name and your e-mail address, so that you can receive a letter.
You may use F23 to clear the customer file, before adding your own data. By doing this, you would not annoy other people.

Figure 2- Customer file updated

Next you are requested to enter some sender's data:
Figure 3- Sender's data

As soon as you press Enter, the custmail sample program, would, for each "customer"

  1. produce a customized copy of the MIME file
  2. address this copy to the customer e-mail


Figure 3- Customized letters were sent

Note. You should look to member custmail in mmail/qrpglesrc to understand how this is accomplished.




    Contact