KeyesMail(tm) - FAQ

Create a Template
Templates can be used with many of the API's
and the KeyesMail output queue (KMLOUTQ)
to assist you in sending e-mail messages,
with attachments. The template provides the
message that goes along with the attachments.
It can also include the subject, options,
addresses, and even other attachments.
- Choose a mailbox that you want to e-mail
from. If you have only a single mailbox,
or if you intend the mail to be sent from
a lot of different users, then you should
use the POSTMASTER mailbox.
- Start item 1 KeyesMail from the menu and change to the selected
mailbox, (Ex: POSTMASTER). You do this by
moving the cursor (back tabbing) to the mailbox
field and entering the correct mailbox name.
- Press F6 to create a new message. KeyesMail will
create a new message and place you in the
Recipient addresses window.
- If this template will be used to mail attachments
to the same recipients every time, then key
their addresses in the window. But, if this
template will be used for different recipients
each time, then do not key any addresses.
Close the window by pressing the Enter key or F12 (Cancel).
- Type a generic subject that could be used
each time you send the attachments, such
as: Weekly Sales Report
- Type a generic message that will be used
each time you send the attachments, such
as: The following attachment is your Weekly
Sales Report ... You may wish to include
contact information, in case the recipient
has any questions.
- Move the cursor up to the Options> line and press Enter to open the Options window.
- Set the From: address to any valid address. You may also
want to set the Auto Purge: parameter to Y. This will make the system self cleaning.
- Note the member name at the top of the screen.
This will be the Template name that you use
in the API's. Press F3 when you are finished
preparing the message.
- On the Work with KeyesMail screen enter an option 2 Change for the newly created mail member. Tab to
the second field and change the Status to read "Template". This will
allow you to recognize your templates, so
you will not accidentally delete them. You
may also wish to move them to a special Category,
to keep them all together.
- Use item 31 User Setup from the menu and enter a 5 on the selected mailbox (Ex: POSTMASTER).
- Add *TEMPLATE to the Authorization list. This will allow
all the API's to use the templates out of
this mailbox, even when the user running
the API does not have specific authority
to that mailbox.
Create a Rich Text Overlay
Use any PC word processor that can create a Rich Text document, such as
MS WordTM or Lotus WordProTM. You will define substitutable fields within
the document. After creating the overlay (RTF document) on the PC, you
must upload this to the System i into a file called KMLTEMP in the KeyesMail
Data library (KMDATA), without translating it (see below for details).
- Substitutable fields
Use a caret symbol (^) for each substitutable field that you want to be
mapped onto the overlay from the System i spooled file printer data. Define
tab stops for one or more lines to position multiple fields on each line.
Place the caret symbol exactly where you want the field to start on the
form, using a single tab between each caret and a carriage return at the
end of each line. Select a font for each of the carets as you would like
the substituted field to be printed.
- Text Boxes
Do not place any of the carets in any Text
Box or Frame. All carets must be coded in
the main body of the document. Headings,
lines, logos, etc. can be positioned using
Text Boxes. However, the Text Boxes should
be positioned relative to the Page top and
side (not the Column or Paragraph). To force
an object to print on top of another, do
not use the ORDER method. Instead you must
create each object in the order you want
them to be written on the page. The last
one created will be on top.
- Making the overlay small
The smaller you can make the RTF document,
the faster the system can map the data and
mail the completed documents. Documents can
be made smaller by creating as many of the
document features within the word processor
rather than importing pictures. Pictures
will create large amounts of graphic code,
as opposed to the smaller RTF commands that
you can define. An imported logo or signature
is a necessary exception. Otherwise, try
to draw all the lines, boxes, shading, and
field headings with the word processor itself.
- Uploading the overlay to the System i
You may use any transfer program that you have available to copy the RTF
document data into the KMLTEMP file, without translating it. As an example,
you may copy the file from your PC to one of the System i's Shared Folders.
Then use the CPYFRMPCD command on the System i to transfer the Shared Folder
file to the KMLTEMP file, with *NONE for translation and *NOTEXT, selected.