KEMBAR78
KeyesMail Manual | PDF | Computer File | Modem
0% found this document useful (0 votes)
301 views199 pages

KeyesMail Manual

KeyesMail Manual for Acom

Uploaded by

Christian Robles
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
301 views199 pages

KeyesMail Manual

KeyesMail Manual for Acom

Uploaded by

Christian Robles
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 199

Version 8, User's Guide

1
Limited Use License Agreement

Limited Use License Agreement


The software described in this document is furnished under a license agreement.
The software may be used or copied only in accordance with the terms of the
agreement. It is against the law to copy the software on any medium except as
specifically allowed in the license agreement.

License
You may use the programs on a single machine and copy the programs into any
machine readable or printed form for backup purposes in support of your use of
the programs on the single machine.
You may not use, copy, modify, sub license, assign, or transfer the programs in
whole or in part to another party.

Term
This license is effective until terminated. You agree upon such termination to
destroy the programs together with all copies.

Warranty
The programs are provided with a 90 day no bug guarantee: If you find that
KeyesMail does not perform a function as it is described in the user's guide,
during the first 90 days after purchase, Computer Keyes will correct the problem
at no charge.
Computer Keyes does not warrant that the functions contained in the programs
will meet your requirements or that the programs are fit for a particular purpose.

Limitation of Remedies
Computer Keyes's entire liability and your exclusive remedy shall be the
replacement of defective materials or workmanship, during the first 90 days.
In no event will Computer Keyes be liable to you for any damages, including any
lost profits, lost savings, or other incidental damages arising out of the use or
inability to use the programs.

© Copyright 2008, Computer Keyes. All rights reserved.


IBM is a registered trademark of International Business Machines Corporation.
KeyesMail, KeyesFax, KeyesFile, and KeyesOverlay are trademarks of
Computer Keyes.
All other company and product names are trademarks or registered trademarks of
their respective holders.

2
Table of Contents

Table of Contents

1 Introduction 11
Installing KeyesMail.................................................................. 12
Sign on as a Security Officer............................................................ 12
New Installation................................................................................ 12
Updating an Existing System............................................................ 12
Copying KeyesMail Programs to a New Library................................ 13
Ending the System and Backing Up the Libraries............................ 13
Run the KeyesMail Update Program................................................ 14
Install the KeyesMail Data library..................................................... 14
Enter your KeyesMail License number............................................. 15
Change your Library List to include the KeyesMail libraries..............16
Create the KeyesMail Subsystem.................................................... 16
Create a KeyesMail Communication line.......................................... 17
Connect a Modem to your iSeries.................................................... 17
Obtain ISP Connection Information.................................................. 18
Define a Connection to a Mail Server............................................... 19
Create a Connection Script for each ISP.......................................... 22
Work with Point-to-Point TCP/IP Modem Information...................... 23
Defining a SLIP Connection Profile.................................................. 23
Defining a PPP Connection Profile................................................... 25
Check a Dial-up Connection............................................................. 26
KeyesMail Communication....................................................... 28
Starting and Stopping Mail Runs...................................................... 28
Working with KeyesMail Connections.............................................. 28
Options............................................................................................. 29
Function Keys.................................................................................. 29
Adding User Mailboxes............................................................. 30
User Setup Screens.................................................................. 31
Authorization Lists............................................................................ 35
Routing Entries................................................................................. 36
Naming Conventions........................................................................ 36
KeyesMail Servers..................................................................... 37
Starting and Stopping the Servers.................................................... 37
Working with KeyesMail Servers...................................................... 37
Options............................................................................................. 38
Function Keys.................................................................................. 38
KeyesMail Server Setup................................................................... 39
External Mailboxes.................................................................... 40
Address Lists............................................................................. 41
Editing an Address List..................................................................... 42
Using PC Mail Clients............................................................... 43
Using a Web Browser............................................................... 44

3
Table of Contents

2 Tutorial 45
Creating and Editing an E-mail Message................................ 46
Addressing your E-mail.................................................................... 47
Keying the Message......................................................................... 47
Inserting Text................................................................................... 48
Spell Checking................................................................................. 49
Copying Lines.................................................................................. 50
Editing and Adjusting Text................................................................ 51
Deleting Lines.................................................................................. 51
Sending your E-mail......................................................................... 51
KeyesFile Information Manager............................................... 52
Switching Members.......................................................................... 53
Managing Information...................................................................... 53
Changing the Index.......................................................................... 54
Editing a Card.................................................................................. 55
Sending E-mail from your Phonebook.................................... 57
Updating the Phonebook from your Mail................................ 58
Addressing your Mail using the Phonebook........................... 59
Sending Attachments with your Mail....................................... 61
Saving Attachments from your Mail........................................ 63
Displaying Attachments.................................................................... 65

3 KeyesMail 67
Cursor positioning............................................................................ 67
Subject column................................................................................ 67
Status column.................................................................................. 68
To/From column............................................................................... 69
Size column...................................................................................... 69
PSAN column................................................................................... 69
Date column..................................................................................... 69
Category>........................................................................................ 70
By:.................................................................................................... 70
Mailbox>........................................................................................... 71
Position to:....................................................................................... 71
Options............................................................................................. 72
User Defined Options....................................................................... 74
Function keys................................................................................... 75
E-mail Security................................................................................. 75

4 Message Editor 77
Launching E-mail from KeyesFile..................................................... 77
The Message Editor Screen...................................................... 78
Getting Help..................................................................................... 78
Hot Spots......................................................................................... 78
Function keys................................................................................... 79
The Message Editor Fields....................................................... 80

4
Table of Contents

Sent:................................................................................................. 80
From:............................................................................................... 80
To>................................................................................................... 80
Subject:............................................................................................ 81
Attach>............................................................................................. 81
Options>........................................................................................... 81
Status:.............................................................................................. 82
Errors:.............................................................................................. 82
Message:......................................................................................... 82
F1=Functions>................................................................................. 82
Editing the Message Text......................................................... 84
Copying Lines of Text....................................................................... 84
Spell Checking................................................................................. 85
Attachments (Inbound)............................................................. 87
Option 1=Save attachment as.......................................................... 87
Option 4=Remove............................................................................ 89
Option 5=Display.............................................................................. 89
Uncompression & Unencryption....................................................... 90
Attachments (Outbound).......................................................... 91
Option 1=Save attachment as.......................................................... 91
Option 2=Change............................................................................. 91
Option 4=Remove............................................................................ 91
Option 5=Display.............................................................................. 91
Defining new Attachments....................................................... 92
Type 1 (PC/Text) or Type 2 (PC/Binary)........................................... 92
Type 3 (PF) or Type 4 (SrcPF)......................................................... 93
Type 5 (SplF)................................................................................... 93
Type 6 (SavF).................................................................................. 95
Compression & Encryption............................................................... 96

5 PhoneBook 97
Starting and Stopping the Phonebook.............................................. 97
KeyesFile's Screen.................................................................... 98
Getting Help............................................................................... 99
Adding and Filling In Cards.................................................... 100
Adding Lines to a Card................................................................... 100
Moving Through Your Cards.................................................. 101
Scrolling through Your Cards......................................................... 101
Displaying a Subsetted List of Cards.............................................. 102
Cancelling a Subsetted List............................................................ 102
Searching for Text in Cards............................................................ 103
Editing Text on Cards............................................................. 104
Scrolling Through a Card............................................................... 104
Inserting a Line in a Card............................................................... 104
Deleting a Line from a Card........................................................... 104
Copying Text to Another Line or Card............................................ 105
Undoing Changes.......................................................................... 105
Using Card Headings.............................................................. 106
Editing Card Headings................................................................... 106
Deleting a Card........................................................................ 107
Duplicating a Card................................................................... 108

5
Table of Contents

Working with E-mail Addresses............................................. 109


Placing an E-mail Address on a Card............................................. 109
Using F2 (Fax/E-mail).................................................................... 109
Printing Lines from Cards...................................................... 110
Printing a Card Image.................................................................... 110
Selecting Lines to be Printed.......................................................... 110
Printing Individual Cards................................................................ 111
Printing a Series of Cards.............................................................. 111
Managing KeyesFile Members............................................... 112
Opening a KeyesFile Member........................................................ 112
Determining Document Member Names and Sizes....................... 112
Copying and Merging Members..................................................... 113
Deleting a KeyesFile Member........................................................ 113
Securing a KeyesFile Member....................................................... 114
Importing and Exporting Data................................................ 115
Importing Data to KeyesFile........................................................... 115
Exporting Data from KeyesFile....................................................... 116
Using KeyesFile as a Phonebook.......................................... 117

6 API's 119
Application Program Interfaces (API's)........................................... 119
Change KeyesMail Password (CHGKMLPWD)...................... 120
Mailbox (MAILBOX)....................................................................... 120
Password (PASSWORD)............................................................... 120
Create a KeyesMail Message (CRTKMMSG)......................... 121
Mailbox (MAILBOX)....................................................................... 121
Recipient's name (NAME).............................................................. 121
Recipient's address (ADDRESS)................................................... 121
Edit a KeyesMail Message (EDTKMMSG).............................. 122
Mailbox (MAILBOX)....................................................................... 122
Mail member (MAILMBR)............................................................... 122
Recipient's name (NAME).............................................................. 122
Recipient's address (ADDRESS)................................................... 122
Returned messages (MESSAGE).................................................. 122
Mail Automatic Reply from a Template (KMLAUTORPY)..... 123
Mail member template (MAILMBR)................................................ 123
To E-mail address (TOADDR)....................................................... 123
Subject (SUBJECT)....................................................................... 123
Change the Status of a Mail Member (KMLCHGSTS)........... 124
Mail member name (MAILMBR)..................................................... 124
New status (NEWSTATUS)........................................................... 124
Mail a PC File as an Attachment (KMLPCFA)........................ 125
Mail member or template name (MAILMBR).................................. 125
To E-mail address (TOADDR)....................................................... 125
Subject (SUBJECT)....................................................................... 125
From E-mail address (FROMADDR).............................................. 125
PC File name (FILENAME)............................................................ 126
Folder (FOLDER)........................................................................... 126
Description (DESC)........................................................................ 126
Translation code (TRANSLATE).................................................... 126
Attachment number (ANUMBER)................................................... 126
Compress attachment (COMPRESS)............................................ 126

6
Table of Contents

Encryption (ENCRYPT).................................................................. 127


Encryption password (PASSWORD).............................................. 127
Sample Code................................................................................. 127
Mail Physical File Member as an Attachment (KMLPFMA).. 128
Mail member or template name (MAILMBR).................................. 128
To E-mail address (TOADDR)....................................................... 128
Subject (SUBJECT)....................................................................... 128
From E-mail address (FROMADDR).............................................. 128
File name (FILENAME).................................................................. 129
Member name (MEMBER)............................................................. 129
Library (LIBRARY).......................................................................... 129
Description (DESC)........................................................................ 129
Translation code (TRANSLATE).................................................... 129
Attachment number (ANUMBER)................................................... 129
Compress attachment (COMPRESS)............................................ 130
Encryption (ENCRYPT).................................................................. 130
Encryption password (PASSWORD).............................................. 130
Sample Code................................................................................. 131
Save an Attachment to Disk (KMLSAVAT)............................. 132
Mail member (MAILMBR)............................................................... 132
Attachment number (ANUMBER)................................................... 132
Filename (FILENAME)................................................................... 132
Description (DESC)........................................................................ 132
Type of attachment (TYPE)............................................................ 132
Translation code (TRANSLATE).................................................... 133
Record length (RECLN)................................................................. 133
Folder (FOLDER)........................................................................... 133
Library (LIBRARY).......................................................................... 133
Member name (MEMBER)............................................................. 133
Output Queue (OUTQ)................................................................... 133
Encryption password (PASSWORD).............................................. 133
Sample Code................................................................................. 134
Mail a Spool File as an Attachment (KMLSPLFA)................. 135
Mail member or template name (MAILMBR).................................. 135
To E-mail address (TOADDR)....................................................... 135
Subject (SUBJECT)....................................................................... 135
From E-mail address (FROMADDR).............................................. 135
Spooled file (SPLFILE)................................................................... 136
Description (SPLDESC)................................................................. 136
Job name (JOBNAME)................................................................... 136
Number (NUMBER)....................................................................... 136
Spooled file number (SPLNBR)...................................................... 136
Remove SplF after preparing (RMVSPLF)..................................... 136
Translation code (TRANSLATE).................................................... 136
From page number (FROMPAGE)................................................. 137
To page number (TOPAGE).......................................................... 137
Attachment number (ANUMBER)................................................... 137
Compress attachment (COMPRESS)............................................ 138
Encrypt with Password (ENCRYPT)............................................... 138
Encryption password (PASSWORD).............................................. 138
User Password (USERPWD)......................................................... 138
Owner Password (OWNERPWD).................................................. 138
Sample Code................................................................................. 139
Mail a Spool File as a Message (KMLSPLFM)....................... 140
First mail member created (MAILMBR).......................................... 140
To E-mail address (TOADDR)....................................................... 140
Subject (SUBJECT)....................................................................... 141

7
Table of Contents

From E-mail address (FROMADDR).............................................. 142


Spooled file (SPLFILE)................................................................... 142
Job name (JOBNAME)................................................................... 142
Number (NUMBER)....................................................................... 142
Spooled file number (SPLNBR)...................................................... 142
Remove SplF after preparing (RMVSPLF)..................................... 142
From mailbox (MAILBOX).............................................................. 143
Category (CATEGORY)................................................................. 143
Send the member to Out Box (SENDMBR).................................... 143
Remove message after sending (RMVMSG)................................. 143
Priority (PRIORITY)........................................................................ 143
From page number (FROMPAGE)................................................. 143
To page number (TOPAGE).......................................................... 143
Delivery Status Notification (DSN).................................................. 144
Request a Read Receipt (REQRR)................................................ 144
Content type (CONTENT).............................................................. 144
Reply-to Address (REPLYTO)........................................................ 144
Sample Code................................................................................. 145
Mail a Spool File with a Message (KMLSPLFWM)................ 146
From mailbox (MAILBOX).............................................................. 146
To E-mail address (TOADDR)....................................................... 146
Subject (SUBJECT)....................................................................... 146
From E-mail address (FROMADDR).............................................. 146
Spooled file (SPLFILE)................................................................... 146
Description (SPLDESC)................................................................. 147
Job name (JOBNAME)................................................................... 147
Number (JOBNBR)........................................................................ 147
Spooled file number (SPLNBR)...................................................... 147
Remove SplF after preparing (RMVSPLF)..................................... 147
Translation code (TRANSLATE).................................................... 147
Text message (TEXT).................................................................... 148
Edit the message (EDITMSG)........................................................ 148
Send the member to Out Box (SENDMBR).................................... 148
Remove message after sending (RMVMSG)................................. 148
From page number (FROMPAGE)................................................. 148
To page number (TOPAGE).......................................................... 148
Compress attachment (COMPRESS)............................................ 148
Encrypt with Password (ENCRYPT)............................................... 149
Encryption password (PASSWORD).............................................. 149
User Password (USERPWD)......................................................... 149
Owner Password (OWNERPWD).................................................. 149
Priority (PRIORITY)........................................................................ 149
Delivery Status Notification (DSN).................................................. 150
Request a Read Receipt (REQRR)................................................ 150
Reply-to Address (REPLYTO)........................................................ 150
Sample Code................................................................................. 151
Mail a Text Message (KMLTXTM)........................................... 152
Mail member created (MAILMBR).................................................. 152
To E-mail address (TOADDR)....................................................... 152
Subject (SUBJECT)....................................................................... 152
From E-mail address (FROMADDR).............................................. 152
Text message (TEXT).................................................................... 152
From mailbox (MAILBOX).............................................................. 153
Category (CATEGORY)................................................................. 153
Send the member to Out Box (SENDMBR).................................... 153
Remove message after sending (RMVMSG)................................. 153
Priority (PRIORITY)........................................................................ 153

8
Table of Contents

Delivery Status Notification (DSN).................................................. 153


Request a Read Receipt (REQRR)................................................ 154
Reply-to Address (REPLYTO)........................................................ 154
Sample Code................................................................................. 154
List KeyesMail Categories (LISTKMCAT).............................. 155
Mailbox (MAILBOX)....................................................................... 155
Printer device (PRINTER).............................................................. 155
Submit to Batch or Interactive (SUBMITJOB)................................ 155
Print a KeyesMail Member (PRTKML).................................... 156
Mailbox (MAILBOX)....................................................................... 156
Mail member (MAILMBR)............................................................... 156
Printer device (PRINTER).............................................................. 156
Inbound header (IHEADER)........................................................... 156
Number of copies (COPIES).......................................................... 156
Purge KeyesMail (PURGEKML).............................................. 157
Period ending date (PERIODEND)................................................. 157
Mailbox (MAILBOX)....................................................................... 157
Type of purge (TYPE).................................................................... 157
Status to purge (STATUS)............................................................. 157
Category to purge (CATEGORY)................................................... 158
Submit to Batch or Interactive (SUBMITJOB)................................ 158

7 Output Queue 159


Starting and Stopping KMLOutQ.................................................... 159
Specifying E-mail Parameters........................................................ 159
Spooled File Attributes........................................................... 160
Front Side Overlay......................................................................... 160
User Defined Data.......................................................................... 160
Work with KeyesMail Spooled Files...................................... 163
Spooled File Setup Screens........................................................... 164
E-mail Commands within Spooled Files............................... 167

Appendix 171
Rules for Creating Connection Scripts........................................... 171
Connection Script Example............................................................ 172
Granting Authority to Start the KeyesMail System............... 173
International Character Set..................................................... 174
Restoring an iSeries or AS/400 Save File.............................. 175
Mapping a Spooled File to an Overlay................................... 176
Creating a Rich Text Overlay (Deprecated).................................... 176
Mapping existing Printer Data........................................................ 178
Creating Custom Printer Data........................................................ 180
The Resulting Mapped Document.................................................. 182
How to Create a Template...................................................... 183
Debugging an Exit Program................................................... 184
Automatic Blind Copies.......................................................... 185
Setting up Auto Blind Copies.......................................................... 185

9
Table of Contents

Spam Filter vs Unsubscribe................................................... 186


How to Create EBCDIC PCL Printer Data.............................. 187

Index 189

10
1 Introduction

1 Introduction

KeyesMail is a full function E-mail package for the iSeries. You can use it to
automatically generate outbound e-mail messages, with attachments. This can be
accomplished using API's or by placing spooled files in an output queue that it
monitors. It can also serve as an interactive e-mail client for 5250 terminals or
PC's.
It allows iSeries 5250 terminals to send and receive full Internet e-mail, with
attachments. KeyesMail contains two different mail servers allowing PC's to use
any POP3 mail client software (Outlook and Eudora are examples), or any Web
browser (Internet Explorer, Firefox and Netscape are examples) to access mail.
KeyesMail can connect to your existing network mail server, or to an Internet
Service Provider (ISP) using a direct or a dial-up connection. Security will not
be compromised. KeyesMail will not start any of the TCP/IP Application
servers. KeyesMail is immune to e-mail viruses and hackers cannot gain access
to your iSeries through the KeyesMail software.
You can retrieve e-mail from more than one ISP or Network and can have
multiple individual accounts or multi-user domain accounts for each connection.
You decide how often the system will contact each host. All incoming messages
are automatically routed to the appropriate mailboxes, that you configure.
The software comes complete with a text editor for creating, editing, and
viewing e-mail messages on iSeries terminals. The editor is very easy to learn
and use. It includes automatic word wrapping within paragraphs, inserting,
deleting, and copying text. It also has a spell checker and a phone book for
saving and retrieving e-mail addresses.
KeyesMail is SMTP/MIME compliant which allows multiple attachments to be
sent and received with your messages. Any iSeries object can be exchanged as
an attachment, including physical files, source files, spool files, program objects,
save files, and any files located in the Shared Folders.
The recipients of the iSeries objects can be on any kind of computer. They do
not have to have an iSeries or AS/400 and they do not have to have KeyesMail
software. The data will be translated between EBCDIC and ASCII, as
appropriate.
Any type of spooled file can be sent as is, so that it can be restored as a spool file
on another iSeries or AS/400 computer. Spool files can also be translated into
ASCII text, Rich Text, PDF files, or mapped onto a forms overlay to be
displayed or printed by PC's. PCL and AFPDS Spool files can also be translated
into TIFF Images or PDF files.
Physical files can be sent as is or translated into ASCII text or CSV (Comma
Separated Values) files that are easily imported into Excel or other Spread
Sheets.
KeyesMail can create encrypted PDF's, if you supply user and/or owner
passwords. If you purchase PKZIP software, for your iSeries, KeyesMail can
use this to compress and optionally password encrypt any type of attachment.

11
1 Introduction

Installing KeyesMail

Sign on as a Security Officer


The following installation procedure will require that you have enough authority
to be able to create subsystems, communication controllers and devices, and to
be able to change system values.

New Installation
If this is the first installation of the KeyesMail system it will take several steps to
complete. Please follow the instructions on the following pages to complete the
installation outlined below.

Steps for a new installation:


• Copy KeyesMail programs to a new library.
• Install the KeyesMail Data library.
• Enter your KeyesMail License number.
• Change your library list to include the KeyesMail libraries.
• Create the KeyesMail Subsystem.
• Create a KeyesMail Communication line. †
• Connect a Modem to your iSeries. †
• Obtain ISP Connection Information. †
• Define a Connection to a Mail Server.
• Create a Connection Script for each connection. †
• Work with Point-to-Point TCP/IP Modem Information †
• Define a SLIP or PPP Connection Profile. †
• Check the Connection. †
• Add User Mailboxes.
• Setup the KeyesMail Servers.
† These items are for dial-up connections only.

Updating an Existing System


An update to an existing KeyesMail system will take fewer steps to complete.
During the update, objects in your original KeyesMail Program library will be
replaced with new ones from the CD or tape.

Steps for an update:


• Copy KeyesMail programs to a new KMUPD library.
• Ending the System and Backing up the Libraries.
• Run the KeyesMail Update program (KMUPDATE).
• Reinstall the KeyesMail Data library (if this is a new version).
• Update KeyesMail License number (if this is a new version).
• Recreate the KeyesMail Subsystem (if this is a new version).

12
1 Introduction

Copying KeyesMail Programs to a New Library


The library that you copy the programs into must not already exist. We suggest
that you restore the KeyesMail programs into a permanent program library called
KMLIB. If this is an update, restore the new programs into a temporary update
library called KMUPD.

Restoring Instructions:
1. If you have a CD or tape load it into the appropriate drive.
2. Restore the programs from the CD, tape, or the Save File from the Web.
New Installation:
Enter: RSTLIB SAVLIB(KM08LIB) DEV(device)
MBROPT(*ALL) RSTLIB(KMLIB)
Updating an Existing System:
Enter: DLTLIB LIB(KMUPD)
Ignore any "Library not found" message.
Enter: RSTLIB SAVLIB(KM08LIB) DEV(device)
MBROPT(*ALL) RSTLIB(KMUPD)
device is the name of the CD drive (usually OPT01) or enter *SAVF if
you are restoring from a Save File. The name of the Save File should
be KM08SVF in QGPL.

Ending the System and Backing Up the Libraries


If this is an update to an existing KeyesMail system, you must end the system.
We recommend that you backup both the KeyesMail Program library and the
KeyesMail Data library, at this time.

Ending and Backup Instructions:


1. End the KeyesMail systems using; ENDKM, ENDKMSRV,
ENDKMLOUTQ, then ENDSBS KMAIL.
2. Get everyone off of the KMMENU and out of any KeyesMail programs.
3. Load a tape to receive the backed up libraries.
4. The following command will backup both libraries.
Enter: SAVLIB LIB(KMLIB KMDATA) DEV(device)

13
1 Introduction

Run the KeyesMail Update Program


If you are installing KeyesMail for the first time, skip this step. Run this only for
an update to an existing KeyesMail Program library. You should have two
KeyesMail Program libraries on your system, the original Program library
(KMLIB), and the temporary Update library just installed (KMUPD).
1. Change your current library to the Update library.
Enter: CHGCURLIB kmupd
2. Prompt the KeyesMail Update program.
Enter: KMUPDATE then press F4 (Prompt)
3. Fill in the appropriate library names in the parameters:
KeyesMail Program library . . . kmlib
KeyesMail Update library . . . . kmupd
4. Press the Enter key to start the update.
5. Change your current library back to whatever you wish.
Enter: CHGCURLIB *crtdft
6. If all of the update library objects were successfully copied to your program
library, you may delete the update library.
Enter: DLTLIB kmupd

Install the KeyesMail Data library


This step will create a library that will contain all your KeyesMail data. You
will need to run this if you are installing a new system or if you are updating
KeyesMail to a different Version number.
Before the KeyesMail Data library can be installed you must change your library
list. Your KeyesMail Program library must be the current library. Also, if you
have installed the KeyesFax system, its library (KFLIB) must be included in
your library list. This will allow the two systems to share Phonebooks and
dictionary files.
In each of the steps below substitute the correct library names.
1. Change your current library to the KeyesMail Program library just installed
or updated, it is usually called KMLIB.
Enter: CHGCURLIB kmlib
2. If you have the KeyesFax system, make sure that the KeyesFax library,
usually called KFLIB, is in your library list.
Enter: ADDLIBLE kflib
3. Install the KeyesMail Data library, we suggest that you call it KMDATA.
Enter: KMINSTALL kmdata
Note! If you get a message saying "KeyesMail communication is active", you
must remove the Job called KMAIL1 that is most likely sitting in the KMAIL1
Job Queue. Use WRKJOBQ KMAIL1 to find it, then use option 4 to End it.

14
1 Introduction

Enter your KeyesMail License number


The KeyesMail system will not fully function until the system is activated with a
license number. The license number is based on your i5, iSeries or AS/400
Serial Number and the Logical Partition that you run it in.
Your KM License number may have been sent to you in the space provided
below or on the packing list that came with the software, if not you may call
Computer Keyes to get it. Before you call, get the serial number of your iSeries.
The KMLICENSE command described below will tell you what the serial
number is and the logical partition.

Recording the KeyesMail License Number:


1. Switch your current library to your KeyesMail Program library, usually
called KMLIB.
Enter: CHGCURLIB kmlib
2. Start up the program that will record your KM License.
Enter: KMLICENSE
3. Key your KM License number in the field provided, then press Enter.

KeyesMail License Number:


Permanent: S# -
Temporary:

15
1 Introduction

Change your Library List to include the


KeyesMail libraries
Your KeyesMail Program library (KMLIB) and your KeyesMail Data library
(KMDATA) must be on your library list in order for you to run the KeyesMail
programs. You may permanently add the libraries to the user portion of the
system's library list or temporarily add them to your own library list whenever
you want to use the system
Your library list should have the following libraries on the list, in the order
specified:
• KMLIB
• KFLIB (If you already have KeyesFax on your system)
• KMDATA
• PKZIP (If you want to compress attachments)

To Permanently add the libraries to the library list:


1. Go to the iSeries Main Menu.
Enter: GO MAIN
2. Select item 7 Define or change the system.
3. Select item 8 Work with system values.
4. Roll down or position to QUSRLIBL and select option 2.
5. You will be placed on the Change System Value screen for changing
QUSRLIBL.
6. Add your KeyesMail and KeyesFax libraries to the list.

To Temporarily add the libraries to your library list:


Enter: ADDLIBLE kmdata
Enter: ADDLIBLE kflib (If this library exists)
Enter: ADDLIBLE kmlib

Create the KeyesMail Subsystem


You will need to run this if you are installing a new system or if you are updating
KeyesMail to a different Version number.
The KeyesMail programs run in their own subsystem, called KMAIL, with their
own job queues, job descriptions, message queues, etc. All of the subsystem
objects needed will be created in the KeyesMail Data library.
1. Be sure that the KeyesMail Program and Data libraries are on your library
list, as described in the previous instructions.
2. Create the KeyesMail Subsystem.
Enter: CRTKMLSBS

16
1 Introduction

Create a KeyesMail Communication line


If you will be dialing into an Internet Service Provider (ISP) with a SLIP or PPP
connection, a communication line must be defined. You may skip this step, if
you will be using a direct or a network connection to the Internet.
First you must determine the system resource name assigned to the
communication port that will be used by the modem. The communication
resource name can be determined using the WRKHDWRSC command.
1. Determine the resource name of the communications port.
Enter: WRKHDWRSC *CMN
2. Note the resource name listed for the V.24 Port that you will be using. If
you only have a single communications line, it will probably be called
LIN011 or CMN01. A second line may be called LIN021 or CMN02, etc.
3. Be sure that the KeyesMail Program and Data libraries are on your library
list, as described on a previous page.
4. Create the KeyesMail Communication Objects.
Enter: CRTKMLCOM then press F4 (Prompt)
5. Fill in the appropriate parameters and press the Enter key.
KeyesMail line number . . . . . 1
Resource name . . . . . . . . . . . cmn01

Connect a Modem to your iSeries


You may skip this step, if your iSeries has a direct or a network connection to
the Internet.
Most Hayes Compatible modems can be connected to the EIA-232 cable that
comes with each V.24 Port on your iSeries. You may double use the same port
and the modem that you have been using for Electronic Customer Support
(ECS).
1. Locate the 25 pin EIA-232 cable for the desired port and plug it directly into
the modem.
2. Connect a telephone cable into the modem.
3. Plug the power cord for the modem to an electrical outlet.
4. Leave any external modem switches to the factory default settings, except
for any switch that is used to change from Synchronous to Asynchronous
communication. Electronic Customer Support (ECS) uses Synchronous,
whereas KeyesMail will use Asynchronous communication.

17
1 Introduction

Obtain ISP Connection Information


You may skip this step, if your iSeries has a direct or a network connection to
the Internet.
Up to 8 different Internet Service Providers (ISP's) can be contacted to send and
receive your mail. Each dial-up connection will be defined as either a SLIP or a
PPP connection, depending on your iSeries or AS/400's capabilities. (Only
newer RISC AS/400's and all iSeries machines can connect using PPP.)
You must obtain the following information from your ISP;
• The local interface address to be used. Quite often this will be
dynamically assigned by the ISP on each connection.
• The ISP's Internet or gateway address. This is sometimes dynamically
assigned on each connection.
• The name or address of the POP3 mail server.
• The name or address of the SMTP mail server.
• The address of the ISP's DNS (Domain Name Server).
• The connection phone number.
• Your log-on account name or user-id.
• Your log-on password.
• The log-on script to be used (SLIP connections only).
• One or more e-mail account names and/or user-id's.
• Passwords for each e-mail account.
• Your domain name (host.network).

Internet Addresses
Smaller ISP's may use the same address for logging on, the POP3 server, the
SMTP server, and the DNS server. Larger ISP's usually use different servers for
each function.
Addresses must be in a dotted decimal format (XXX.XXX.XX.X). Server
names are quite often called "mail." in front of the ISP's domain name. For
example "mail.domain-name.net". Or sometimes they will be named separately,
such as "smtp.domain-name.net" and "pop3.domain-name.net".
It is possible to Sign-on to the Internet using a connection on one ISP, and
download your E-mail from a POP3 server run by a different ISP. You simply
have to code the server addresses, account names, and passwords, appropriately.

18
1 Introduction

Define a Connection to a Mail Server


You can define up to 8 different connections. These can be to different ISP's, to
your iSeries mail servers, or to your network mail servers. Mail is sent outbound
using an SMTP mail server. Inbound mail is retrieved from a POP3 mail server.

ISP Mail Accounts


If you are connecting to an ISP, we recommend that you purchase a single
domain mail account. A domain mail account at your ISP could receive mail for
everyone in your entire domain or company. KeyesMail will route each message
received into the appropriate mailbox within KeyesMail on the iSeries. This can
save you money, as it would allow you to pay for a single mail account at your
ISP, instead of individual accounts for each user.
Domain mail accounts are defined on the KeyesMail System Setup screens which
are accessed from the Work with KeyesMail Connections program. After mail is
received from a domain mail account, it is routed to the appropriate KeyesMail
mailbox using the Routing entries that you define in the User Setup screens.
Individual or personal mail accounts are defined on the User Setup screens.

Defining a Connection
1. Be sure that the KeyesMail Program and Data libraries are on your library
list, as described on a previous page.
2. Display the KeyesMail Menu.
Enter: GO KMMENU
3. Start item 21 Work with KeyesMail Connections.
4. Use option 3 to copy an existing connection to the new number. If no
connections exist use F6 to create a new one.
5. Use option 2 to define the new connection information. The Help key may
be used to get additional information about each parameter.
Sample connections are shown on the following pages.

19
1 Introduction

Sample Dial-up Connection


Use this sample definition for dial-up connections. Be sure to substitute your
domain name and the appropriate server names and account names. If you have
a domain mail account, define it here. If you have individual accounts for each
user, define those on the User Setup screens.

KeyesMail System Setup

Type choices, press Enter.

KeyesMail connection number . . . . . . . > 1 1, 2, 3, 4, 5, 6, 7, 8


Text description 'use quotes' . . . . . > 'Dial-up connection'
Organization/'Company name' . . . . . . . .> 'Company Name'
Connection type . . . . . . . . . . . . . . . . . . > D (Dialup/Intranet/Continuous)
Time zone . . . . . . . . . . . . . . . . . . . . . . . > *SYS (hrs from Universal time)
Domain name 'use quotes' . . . . . > 'company.com' (key in quotes)
SMTP Server 'Name' or Address . . . . . .> 'smtp.iprovider.net' (Outbound mail)
POP3 Server 'Name' or Address . . . . . .> 'pop3.iprovider.net' (Inbound mail)
SMTP Authentication:
User/Account 'use quotes' . . . . . . > *NONE
Password 'use quotes' . . . . . . > *SAME
Domain mail account #1:
User/Account 'use quotes' . . . . . . > 'account-name' (company accts)
Password 'use quotes' . . . . . . > 'password' (only go here)
Domain mail account #2:
User/Account 'use quotes' . . . . . . > *NONE
Password 'use quotes' . . . . . . > *SAME

Check mail start time . . . . . . . . . . . . . . > 0800


Check mail end time . . . . . . . . . . . . . . > 1700
Time between checks . . . . . . . . . . . . . > 030 (minutes 5-240)
Off hours time between checks . . . . . . . > 0 (hours 0=no check)
Redial attempts . . . . . . . . . . . . . . . . . . > 2
Connection timeout . . . . . . . . . . . . . . . . > 03 (minutes)
Communication timeout . . . . . . . . . . . . > 045 (seconds)
Max mail size auto retrieved . . . . . . . . . > 02000 (Kbytes)
Max mail size manual retrieved . . . . . . . > 05000 (Kbytes)
Lowest priority starts send . . . . . . . . . .> H (L,N,H ' '=none)
System Phonebook . . . . . . . . . . . . . . . > PHONEBOOK
Phonebook Name Heading . . . . . > CONTACT
Phonebook Company Heading . . . . . > COMPANY
Phonebook E-mail Heading . . . . . > E-MAIL
SMTP Port (usually 00025) . . . . . . . . . . > 00025
POP3 Port (usually 00110) . . . . . . . . . . > 00110
Default System Language . . . . . . . . . . . > AMERICAN
(Also available: British, Danish, French, German, Italian, or Spanish)
Expire rejected passwords . . . . . . . . . . > N (Y,N)
Default paper size . . . . . . . . . . . . . . . . > S (S)tandard, (L)egal, (A)4
Disable PING connection test . . . . . . . . > N (Y,N)
Text or Image based PDF's . . . . . . . . . > T (T,I)
Encode PDF text streams . . . . . . . . . . > Y (Y/N)
Batch Conversion Run Priority . . . . . . . > 50 20-99, Default 50

20
1 Introduction

Sample Network Connection


You can define a KeyesMail connection directly to your own iSeries, if you have
activated the IBM SMTP and POP3 mail servers.More commonly, you can
define a connection to a network mail server, if your iSeries is connected to the
network using TCP/IP.
You may define POP3 mail accounts for each of the iSeries terminals, just as if
they were more PC's on the network. KeyesMail will act like an SMTP and
POP3 mail client to send and receive the mail.

KeyesMail System Setup

Type choices, press Enter.

KeyesMail connection number . . . . . . . > 1 1, 2, 3, 4, 5, 6, 7, 8


Text description 'use quotes' . . . . . > 'Network connection'
Organization/'Company name' . . . . . . . .> 'Company Name'
Connection type . . . . . . . . . . . . . . . . . . > I (Dialup/Intranet/Continuous)
Time zone . . . . . . . . . . . . . . . . . . . . . . . > *SYS (hrs from Universal time)
Domain name 'use quotes' . . . . . > 'company.com' (key in quotes)
SMTP Server 'Name' or Address . . . . . .> 'smtp.iprovider.net' (Outbound mail)
POP3 Server 'Name' or Address . . . . . .> 'pop3.iprovider.net' (Inbound mail)
SMTP Authentication:
User/Account 'use quotes' . . . . . . > *NONE
Password 'use quotes' . . . . . . > *SAME
Domain mail account #1:
User/Account 'use quotes' . . . . . . > *NONE (individual accts)
Password 'use quotes' . . . . . . > *SAME (are coded in User Setup)
Domain mail account #2:
User/Account 'use quotes' . . . . . . > *NONE
Password 'use quotes' . . . . . . > *SAME

Check mail start time . . . . . . . . . . . . . . > 0800


Check mail end time . . . . . . . . . . . . . . > 1700
Time between checks . . . . . . . . . . . . . > 010 (minutes 5-240)
Off hours time between checks . . . . . . . > 2 (hours 0=no check)
Redial attempts . . . . . . . . . . . . . . . . . . > 0
Connection timeout . . . . . . . . . . . . . . . . > 01 (minutes)
Communication timeout . . . . . . . . . . . . > 045 (seconds)
Max mail size auto retrieved . . . . . . . . . > 05000 (Kbytes)
Max mail size manual retrieved . . . . . . . > 05000 (Kbytes)
Lowest priority starts send . . . . . . . . . .> N (L,N,H ' '=none)
System Phonebook . . . . . . . . . . . . . . . > PHONEBOOK
Phonebook Name Heading . . . . . > CONTACT
Phonebook Company Heading . . . . . > COMPANY
Phonebook E-mail Heading . . . . . > E-MAIL
SMTP Port (usually 00025) . . . . . . . . . . > 00025
POP3 Port (usually 00110) . . . . . . . . . . > 00110
Default System Language . . . . . . . . . . . > AMERICAN
(Also available: British, Danish, French, German, Italian, or Spanish)
Expire rejected passwords . . . . . . . . . . > Y (Y,N)
Default paper size . . . . . . . . . . . . . . . . > S (S)tandard, (L)egal, (A)4
Disable PING connection test . . . . . . . . > N (Y,N)
Text or Image based PDF's . . . . . . . . . > T (T,I)
Encode PDF text streams . . . . . . . . . . > Y (Y/N)
Batch Conversion Run Priority . . . . . . . > 50 20-99, Default 50

21
1 Introduction

Create a Connection Script for each ISP


You may skip this step, if your iSeries has a direct or a network connection to
the Internet.
A connection script is always used by dial-up SLIP connections and is rarely
used by PPP connections.
The connection script is used to exchange Sign on and Password information
with the ISP. It can also be used to dynamically assign your Local interface
address and the Remote IP address (sometimes called the Gateway address).
Using the log-on script obtained from the ISP you can create an appropriate
script.
1. Start item 21 Work with KeyesMail Connections from the KeyesMail menu,
as described previously.
2. Press F22 Work with Connection Scripts.
3. Choose one of the sample connection scripts that is the closest match to
what your ISP needs. You can read each script using option 5 (View).
4. Use option 3 to copy the selected connection script member to a new
member that you will call KMAILx (where x is the Connection number).
5. Use option 2, if necessary, to change the Connection Script to match the
log-on script from your ISP. Please see Rules for Creating Connection
Scripts in the Appendix section for additional information.
6. Repeat steps 3, 4 & 5 for each Connection to be defined.
7. Press F3 when you have finished creating the scripts.

Sample KeyesMail Connection Script

****************************************************
* KeyesMail Connection Script *
* For iSeries with Dynamic IP Address *
****************************************************
login
& (USERID)
password
& (PASSWORD)
IP address is (IPADDR)
* End of KeyesMail Connection Script

22
1 Introduction

Work with Point-to-Point TCP/IP Modem


Information
You may skip this step, if your iSeries has a direct or a network connection to
the Internet.
IBM has created the appropriate initialization string for a number of different
kinds of modems, but not necessarily for the brand that you wish to use. You
may need to copy one of their definitions to make one for your modem.
1. Start item 21 Work with KeyesMail Connections from the KeyesMail menu,
as described previously.
2. Press F21 Work with TCP.
3. Choose option 11 Work with modem information.
4. If your modem is not already defined, copy one of the definitions for a
modem that is similar to yours using option 3 (Copy). You may not alter
any of the DEFAULTS.
5. Use option 2 (Change), on the new modem information, to alter the modem
initialization string to match the capabilities of your modem.
Note: The TCP/IP connection is very sensitive to the modem initialization
string. An incorrect initialization will cause the modem to hang up during a
connection attempt.
Practical Peripherals use AT&D2&C1X4V1Q0S7=70&Q9&K3
PP33.6MT: AT&FW1&C1&D3&K3&Q5&S0%C1\N3S95=1S0=1&W
For reset use ATZ0

Defining a SLIP Connection Profile


You may skip this step, if your iSeries has a direct or a network connection to
the Internet, or if you will be defining a PPP connection.
Using the information obtained from the ISP you can create a profile, as
follows:
1. Start item 21 Work with KeyesMail Connections from the KeyesMail menu.
2. Press F21 Work with TCP.
3. Choose option 1 Work with Point-to-Point TCP/IP.
4. You may copy any existing KMAILx profile and change it or create a new
profile by entering option 1 Add with a Name of KMAILx (where x is the
Connection number) and a Mode of *DIAL.
5. Fill out the parameters using the ISP connection information that you
gathered earlier, as shown on the following page:
6. Repeat steps 4 & 5 for each Connection.
7. Press F3 twice when you have finished creating the profiles.

23
1 Introduction

Sample SLIP Connection Profile

TCP/IP Point-to-Point *DIAL Profile

Name: KMAILx (x=Connection number)


Text: KeyesMail Connection #x

TCP/IP Information:
Protocol type . . . . . . . . . . . . . . . . . . *SLIP
Local interface address . . . . . . . . . . *DYNAMIC (normally *dynamic)
Remote IP address . . . . . . . . . . . . . *DYNAMIC (dotted decimal addr)
Request header compression . . . . . N (N=SLIP, Y=CSLIP)
Maximum transmission unit . . . . . . . 576
Add default route . . . . . . . . . . . . . . . Y
Additional name server . . . . . . . . . . . 165.87.194.244 (DNS server addr)

Physical line information:


Line description . . . . . . . . . . . . . . . . KMAILLIN1 (use for all Connections)
Line type . . . . . . . . . . . . . . . . . . . . . . *ASYNC
Auto create controller & device . . . . . Y
Remote location name . . . . . . . . . . (Leave blank)

Modem information:
Use a modem . . . . . . . . . . . . . . . . . Y
Modem information name . . . . . . . . (Use F4 to select a modem)
MultiTech 28800 Multimodem

Script source information:


Use connection dialog script . . . . . . . Y
Member . . . . . . . . . . . . . . . . . . . . . KMAILx (x=Connection number)
File . . . . . . . . . . . . . . . . . . . . . . . . KMSCRIPT
Library . . . . . . . . . . . . . . . . . . . . KMDATA
ASCII character set identifier . . . . 00819

Remote system access information:


Remote service phone number (connection number)
9,674-1201
Remote service access name (log-on account and/or user-id)
usinet sample
Remote service access password (log-on password)
password

Sample Connection to A T&T's Global Network

24
1 Introduction

Defining a PPP Connection Profile


You may skip this step, if your iSeries has a direct or a network connection to
the Internet, or if you have defined a SLIP connection.
If you have OS/400 V4R2 or higher, you may be able to define a PPP
connection. PPP requires a 2699, 2720, 2721, 2745 or a PCI-WAN IO Adaptor.
Earlier releases and earlier adaptors will only support SLIP connections. You
must also have Operations Navigator installed and working on a PC. If you
meet these prerequisites, you can define a PPP dial-up connection.
Complete instructions can be found under "Configuring Point-to-Point TCP/IP"
in the IBM TCP/IP Configuration and Reference Manual V4R2.
The following instructions use the iSeries Operations Navigator with Client
Access.
1. Start the iSeries Operations Navigator and click on the machine that you
intend to configure. This will give you a list of components that the
Operations Navigator can access.
2. Double Click Network.
3. Double Click Point-to-Point.
4. Right Click Connection Profiles to open a Context window.
5. Select New Profile.
6. Select each Tab and fill out the appropriate parameters on the "New Point
to-Point Profile Properties". You may use the Help button for additional
information.
Note: You must call the profile KMAILx, where x is the connection number.
The information that you fill out will be pretty much the same as defining a
connection for a PC to an ISP.
The following parameters are normally set, as follows:
• Name: KMAIL1
• Type: PPP
• Mode: Switched line-dial or Dial
• Line name: KMAILLIN1
• Interface type RS232 / V.24
• Modem Choose the appropriate one from list
• Local IP address Usually dynamically assigned
• Remote IP address Usually dynamically assigned
• Routing Press button
• Static routing Add remote as default route
• Header compression Usually yes
• Script Usually not used
• Authentication Enable local system identification
• User name/Password These are case sensitive
• Domain name server Give dotted decimal address

25
1 Introduction

Check a Dial-up Connection


After creating or changing a dial-up connection to an ISP, you should use these
instructions to verify that all the parameters are set correctly before attempting to
start the KeyesMail mail run. If you can position yourself at a terminal that is
near the modem, you can watch and listen to the modem while running the test.
Note: You will need the Domain name for the ISP or its dotted decimal address
(xxx.xx.xxx.x) for this test. You can also use the ISP's SMTP Server or POP3
Server name or address.

Starting TCP/IP:
Before the test can be performed, you must start the TCP/IP interface on the
iSeries. Be careful not to start any application servers.
Enter: STRTCP STRSVR(*NO)

Starting the Point-to-Point TCP/IP connection:


1. Start item 21 Work with KeyesMail Connections from the KeyesMail menu.
2. Press F21 Work with TCP.
3. Choose option 1 Work with Point-to-Point TCP/IP.
4. Enter option 9 (Start) on the KMAILx profile. (where x is the Connection
number to be tested).
5. Use F5 (Refresh) periodically so you can watch the Status column and listen
to the modem, if possible, to follow the system as it attempts to connect to
the ISP.

If the connection is successful:


• The Status will change to STRSSN while it sets up an interface to the
communication line.
• After 20-30 seconds the communication line will be Varied ON. You
can tell when this happens because the modem's TR light will turn on.
• After a few more seconds the Status will change to DIAL as the modem
dials and tries to connect with the ISP.
• After another 10-15 seconds the Status will change to CNNDIALOG as
the connection script is being processed.
• In just a few more seconds, if the ISP accepts the user-id and password,
the Status will change to ACTIVE.

Verifying the Point-to-Point TCP/IP connection:


1. Press F12 (Cancel) to get to a command line and verify the connection using
a PING to the ISP's name or address.
Enter: PING RMTSYS('name or address')
Note: If the PING is successful you will see a successful verification
message.

26
1 Introduction

If the connection was not successful:


• The modem does not vary ON.
• The modem does not dial the ISP.
• The ISP does not answer.
• The modem hangs up during the connection.
• The Status does not change to ACTIVE.
- or -
• The PING does not return a successful verification message.

Ending the Point-to-Point TCP/IP connection:


1. Enter option 10 (End) for the KMAILx profile on the Work with Point-to
Point TCP/IP screen.
2. Use F5 (Refresh) periodically so you can watch the Status column. The
Status will change from ENDTCPCMN to ENDSSN and finally to OUTQ
when it has completed.

Diagnosing a failed connection:


If the connection fails, one or two spool files will be created to assist you in
diagnosing the cause of the failure.
1. Enter option 14 (Work with Job) for the KMAILx profile on the Work with
Point-to-Point TCP/IP screen.
2. Enter option 4 (Work with spooled files).
3. Use option 5 (Display) to view the spooled files or you can allow them to
print.
• One of the spooled files, called KMAILx, is a trace of the connection
dialog. This can be used to diagnose problems with the connection
script.
• The other spooled file is a session job log which can be used to see how
the connection failed.

27
1 Introduction

KeyesMail Communication
All KeyesMail communication is performed in a KMAIL subsystem. Dial
profiles use one of your communication ports to connect to an ISP. Direct and
network connections use other established communication links to connect to
mail servers. KeyesMail will act as an SMTP and a POP3 mail client to
exchange e-mail with the Internet.

Starting and Stopping Mail Runs


You may start or stop the KeyesMail Mail Runs either manually or using
commands:

Manually starting or stopping KeyesMail Mail Runs:


1. Select item 21 (KeyesMail Connections) from the KeyesMail menu.
2. Use option 1 to start or option 4 to end any of the mail runs.

Using Commands:
The commands STRKM and ENDKM can be used to start or stop KeyesMail
Mail Runs, respectively. You may wish to place STRKM in your normal
QSTRUP routine, so that it automatically starts after an IPL. It is also
recommended that you end all Mail Runs before and restart them after doing any
backup of the KeyesMail data library.

Working with KeyesMail Connections


A user must have *JOBCTL special authority to use this program. A user must
also have access to the KMAIL user profile to start a Mail Run (option 1).
Please see Granting Authority to Start the KeyesMail System in the Appendix
section for more information.

Work with KeyesMail Connections


KMLOutQ Process: RDY
Type option, press Enter.
1=Start 2=Change 3=Copy 4=End(Normal) 7=Cancel(Immed) 8=Remove

Cntn
Opt # STS Current/Previous activity

_ 1 SCH Next scheduled mail run is at 14:09 on 050800 Dial-up connection


Completed run at 12:39 on 050800 0003 sent 0002 rcvd 0000 rjct

_ 2 RUN Sending mbr: M050813013 mailbox: ACCOUNTING 20 of 45K


Starting a mail run Network connection

F3=Exit F5=Refresh F6=Add new Call F9/F10 Start/End KMLOutQ


F12=Cancel F13=KMail Jobs F14=MsgQ F15=JobQ
F20=Work w/Hdwr F21=Work w/TCP F22=Work w/Cntn Scripts

28
1 Introduction

Options
Option 1=Start
This will start the KeyesMail subsystem, if it was not already active, and then
start a mail run for the selected Connection. If a mail run is already scheduled
for a later time, it will be immediately released.

Option 2=Change
This can be used to change the setup information for each Connection.

Option 3=Copy
This can be used to copy the Connection information to create a new one for
another ISP or network connection.

Option 4=End
This is the normal way to end a mail run that is either active or scheduled.

Option 7=Cancel
This can be used to immediately end a mail run, if it is stuck or not responding
properly.

Option 8=Remove
This can be used to remove a Connection definition when it is no longer needed.

Function Keys
Press this: To do this:
F3 Exit the program.
F5 Update the screen with current activity.
F6 Creates a new Connection for a mail server.
F9 Starts the KeyesMail output queue processing.
F10 Ends the KeyesMail output queue processing.
F12 Cancels the program.
F13 Shows you all the active Jobs in the KMail subsystem.
F14 Shows you all the messages in the KMail MsgQ.
F15 Shows you all the KMail Job Queues.
F20 Shows you the Work with Communication Resources screen.
F21 Shows you the Work with Point-to-Point TCP/IP menu.
F22 Lets you work with Connection Scripts.

29
1 Introduction

Adding User Mailboxes


All outbound mail can be sent from a single default mailbox (POSTMASTER),
if desired. Or you can send mail from individual mailboxes made for each
department or user.
Before a user can receive e-mail on their 5250 terminal or PC mail client, they
will need a KeyesMail mailbox created for them.
To add mailboxes, you must be signed on with a user profile that has *SECADM
special authority. Users may change some of their own mailbox attributes but
only after you have added their mailbox to the system.
1. Start item 31 User Setup from the KeyesMail menu.
2. You may add mailboxes by entering them on the top line, or use F15 to
browse the iSeries user profiles to select and add user mailboxes.

Work with KeyesMail Users

Position to:
Options: 2=Setup 3=Copy 4=Delete 5=Authorization List

Option Mailbox Name


Enter new Mailbox here to add
_ ACCOUNTING Accounting Department
_ BILL Bill Doe
_ JOHN John Doe
_ KRIS Kristine Smith
_ MIKE Mike Smith
_ POSTMASTER Company Name
_ SALES Sales Department
_ SUPPORT Technical Support

Bottom

F3=Exit F10=Routing Entries F12=Cancel F15=Browse User Profiles


F17=Top F18=Bottom

Important! Name each of the user mailboxes the same as their iSeries User-Id.
This is done so that the system can locate the user to notify them when mail
arrives. You may also create mailboxes for groups of users and use the
Authorization List screen to specify users to notify. For example, you can create
a mailbox called SALES and one called ACCOUNTING that multiple users can
access.
Note: You must create a mailbox for POSTMASTER. This is used to hold
inbound mail from a domain mail account that cannot be routed according to
your routing table and outbound mail from applications or users that do not have
their own mailbox to use.

30
1 Introduction

User Setup Screens


Each time an administrator adds a new mailbox, the system will preset some of
the fields to default values. A user may change only those fields that an
administrator allows them to.
A user will be placed directly on these screens when they run option 31 User
Setup from the KeyesMail menu. An administrator may use option 2 (Setup)
from the Work with KeyesMail Users screen to access the following screens.

WRKKMU User Setup Date


user-id Mailbox: USER-ID Time

Type choices, press Enter.


Name . . . . . . . . . . . . . . . . . . . . . . : User Name
Department . . . . . . . . . . . . . . . . . : department
Return address . . . . . . . . . . . . . . . : mail-id@domain.network
Restrict to Local Network . . . . . . . : N Yes, No
Restrict Attachments . . . . . . . . . . : P Yes, No, Partial
Disable Purge Function . . . . . . . . : N Yes, No
Mail Notification
Delivery mode . . . . . . . . . . . . . : N (N)=Normal, (B)=Break, ( )=none
Return read receipts . . . . . . . . . : _ (N)=Never, (A)=Always, ( )=Ask first
Send failed e-mail msgs . . . . . . : Y (Y)=Yes, (N)=No

Personal Language . . . . . . . . . . . : Leave blank to use


Personal Phonebook . . . . . . . . . . : the default system
Name heading . . . . . . . . . . . . : CONTACT values ---------------
Company heading . . . . . . . . . . : COMPANY
E-mail heading . . . . . . . . . . . . . : E-MAIL

Routing entries: MAIL-ID


More...
F3=Exit F12=Cancel

WRKKMU Personal Setup Date


user-id Mailbox: USER-ID Time

Personal Mail Account


Acct User-Id . . . . . . . . . . . . . . . . . : mail-id
Acct Password . . . . . . . . . . . . . : password
Connection Number . . . . . . . . . : 1 1, 2, 3, 4, 5, 6, 7, 8
Remove from Server . . . . . . . . : Days (' '=Today, N=Never)
Auto Forward . . . . . . . . . . . . . . . . : Yes, No
Forward to Address . . . . . . . . :
Auto Reply member . . . . . . . . . . . :
Keep deleted mail . . . . . . . . . . . . . : 07 Days
Auto purge mail threshold . . . . . . . : 90 %
Max Sign-on attempts . . . . . . . . . : 05 0-99 (0=None allowed)
Spam Filter On . . . . . . . . . . . . . . . : Y Yes, No
Signature text:
User's Name
Company Name
Address
Phone Number
E-mail Address
F3=Exit F12=Cancel Bottom

31
1 Introduction

Note: Instructions for setting the fields that a user may change can be found in
the WRKKMUFM source code which is located in QDDSSRC in KMLIB.

Name
The user's full name in upper and lower case. For the Postmaster mailbox, you
can use the Company Name.

Department
This can be used to assist a user in locating someone that works in a particular
area. It can also be used when sending mail to groups of users.

Return address
For convenience, try to set the mail-id to be the same as the iSeries User-Id.
Each user's Return address is their POP3 mail account name (mail-id) added to
the left of your domain name, as shown below:
mail-id@domain.network
You may use different conventions for Internet addresses as you use for the
iSeries User-Id. For example, John Smith might use John for his User-Id, but
use jsmith for his mail-id.

Restrict to Local Network


Key a Y in this field to restrict a user to sending e-mail only to their local
network. Manually addressed mail must have the same domain as the user's
return address.
Restricted users, however, may address mail to any predefined mailbox or
address list, even if some of those recipients are located outside the local
network.

Restrict Attachments
To prevent a user from creating or saving any attachments, code a Y in this field
You may code a P in the field to allow the user Partial access to creating and
saving attachments.
The exact definition of Partial access can be altered by an administrator by
altering the program called CHKKMAS. The original definition allows a user
access to their own output queue, their own QTEMP library, their own shared
folder, and a public folder called EMAIL.

Disable Purge Function


Key a Y in this field to disable the Purge function from removing mail from this
mailbox. You will still be able to manually delete or move mail out of the
mailbox. But, the Purge mail function will skip this mailbox.
You can use this feature to create an Archive type of mailbox. Mail can be auto
Blind Copied into the mailbox. Mail will remain forever and never be purged
unless you turn OFF the Disable Purge Function.

Mail Notification

32
1 Introduction

Use this to define what method that you want to be notified when mail has been
received in your mailbox.

Delivery mode:
Key an N to receive a Normal message in your message queue or key a B to
receive a Break message. Leave this field blank to receive no notification
messages.

Return read receipts:


Key an N to never send a Read Receipt. Key an A to always send a Read
Receipt. Leave this field blank to ask permission before sending a Read Receipt
back to any sender that requests one.

Send failed e-mail messages:


Use this field only if you are sending e-mail with Return Addresses that do not
come back to the iSeries or KeyesMail. If you code a Y in this field,
transmission failure messages will be generated and sent to the From Address
that was coded for each failed e-mail message.

Personal Language
Use this field to override the default system language that is entered in the
System Setup. This will be used when spell checking E-mail messages. The
available languages are:
American, British, Danish, French, German, Italian and Spanish

Personal Phonebook
A user should leave these parameters blank, if they wish to use the common
System Phonebook. The System Phonebook is defined in the System Setup.

Personal Mail Account


Enter an account name, password, and a connection number, if you have an
individual POP3 mail account that feeds this mailbox. The number of days
before removing mail from the server can be used when you have a second mail
client accessing the same mail account on your mail server. Leave these fields
blank if you have defined a domain mail account on the System Setup that
contains mail for this mailbox.
The password field is also used to validate both PC mail clients and Web
browsers, to allow them to access the mail in this mailbox.

Auto Forward
Enter a (Y) in this field to cause all inbound mail to be forwarded to another
address. This can be used when a person is temporarily out of the office, or to
define an internal mailbox for a user that is actually located elsewhere.

Forward to address
Used only when you have coded a (Y) in the previous field, you may enter an
Internet address or an address list in this parameter. If you forward to an address

33
1 Introduction

list, you may not exceed 100 recipients and you may not include this mailbox in
any department or address list.

Auto Reply member


Enter the name of an existing mail member only if you wish all inbound mail to
be automatically replied to. The reply message, found in the member, will be
sent to the normal reply-to address for each piece. This can be used to report
vacation delays, change of address, alternate recipients, or other important
messages.

Keep deleted mail


Key the number of days that you wish to save deleted mail before it is purged.
When you delete mail, it is placed in a Category called *Deleted and will only
be purged after the delay. You may undelete a message by moving it to a
different Category.

Auto purge mail threshold


The maximum number of mail members that can be created is 32766 in each
mailbox. Each morning the system will remove the oldest members that exceed
the auto purge mail threshold.

Max Sign-on attempts


Use this field to prevent hackers from gaining access to your mail accounts using
a Web browser. The system will automatically disable the mailbox, whenever
the maximum invalid attempts have been made. The mailbox will be
automatically re-activated after 1 hour of no Sign-on attempts.
You may enter a 0 value to prevent all access to this mailbox using a Web
browser.

Spam Filter On
Each mailbox can turn On or Off their own spam filter. When the filter is On,
mail that meets the spam criteria will be received into the *Spam category. Mail
in the *Spam category will remain until the Mail purge delay has been reached.
Then the spammed mail will be purged.
You may remove an entry from the *Spam category using the Move option to
move it to a different category. When you move an entry out of *Spam, the
corresponding e-mail address will no longer be considered spam for the current
mailbox.
You may move an entry into the *Spam category using the "S" option in the
Work with KeyesMail screen. After spamming an e-mail entry, the
corresponding e-mail address will be considered spam for the current mailbox.

Signature text
Use these fields to define information about yourself (company, phone numbers,
etc.) that you wish to include with your messages. You may include this text
with any e-mail by positioning the cursor and pressing F16 (Add Signature),
while editing the message.

34
1 Introduction

Authorization Lists
Up to 50 different users may be given access to each internal mailbox, by coding
their iSeries User-Id on this screen. All users that have either an "N" or a "B"
coded after them will be sent either a Normal message or a Break message
telling them when mail has arrived in this mailbox.
In the following example, Bill and John have access to the mail in this mailbox.
John will be sent a Break message when mail arrives.

Authorization List

List all users authorized to access and control E-mail for: SUPPORT
Code (N) to Notify user or (B) to send a Break message.

BILL JOHN B

F3=Exit F12=Cancel

You should not include the owner of a mailbox in their own list. By default, the
owner of a mailbox will be notified of any received mail. In the following
example, Mike has been authorized to access the e-mail in Kris's mailbox.

Authorization List

List all users authorized to access and control E-mail for: KRIS
Code (N) to Notify user or (B) to send a Break message.

MIKE

F3=Exit F12=Cancel

Special Values
*PUBLIC may be used to allow all users to access a mailbox.
*TEMPLATE may be used to allow any API to access a mailbox.

35
1 Introduction

Routing Entries
Routing entries must be included for every internal mailbox. The routing entries
are used to determine which mailbox an Internet address will be sent to.
Each of the entries in the routing table is used to search the name and address of
any mail coming from a company domain account. It is also used to recognize
internal addresses in all outgoing mail.

Routing Entries

Make changes, press Enter.


Separate multiple entries with commas
Use leading spaces to change routing order

Mailbox Routing entries


JOHNSON JOHNSON
ACCOUNTING ACCOUNTING, ACCTNG
BILL BILL, WILLIAM
JOHN JOHN
KRIS KRIS
POSTMASTER POSTMASTER
SALES SALES

F3=Exit F5=Refresh F12=Cancel F17=Top B18=Bottom

The first matching entry that is found will cause the mail to be routed to that
mailbox. If none of the routing entries match the recipient address, the mail will
be routed to the Postmaster mailbox.
Leading spaces can be used in the routing entries to change the order in which
the routing takes place. In the example above, to prevent all of JOHNSON's
mail from being routed to JOHN, a leading space was used. This forces the
routing of JOHNSON's mail to happen before the routing of JOHN's mail.

Naming Conventions
Always create user mailboxes the same as their iSeries User-Id. Use this same
value for the POP3 Mail-Id, if possible. If you wish to use a different
convention for your Internet addresses, then be sure to use the Mail-Id in both
the Return Address and the Routing Entry.
Given: Assign:
User name: John Smith Mailbox: JOHN
iSeries User-Id: JOHN Return address: jsmith@domain
Mail-Id: JSMITH Routing entry: JSMITH

36
1 Introduction

KeyesMail Servers
KeyesMail servers can be used to allow PC's to send and receive mail using a PC
mail client or a Web browser. You do not need to activate the SMTP or POP3
servers if you already have a network mail server. Otherwise, these servers can
eliminate the need for each PC to dial-up the Internet independently. It can also
save you money by eliminating multiple accounts with an ISP, when you have
the ISP define a single domain mail account for your entire company.

Starting and Stopping the Servers


You may start or stop the KeyesMail Servers either manually or using
commands:

Manually starting or stopping KeyesMail Servers:


1. Select item 22 (KeyesMail Servers) from the KeyesMail menu.
2. Use option 1 to start or option 4 to end each of the servers.

Using Commands:
The commands STRKMSRV and ENDKMSRV can be used to start or stop the
KeyesMail Servers, respectively. You may wish to place STRKMSRV in your
normal QSTRUP routine.

Working with KeyesMail Servers


The WRKKMSRV (Work with KeyesMail Servers) program is used to control
and track the e-mail server activity on your system. A user must have *JOBCTL
special authority to use this program.

Work with KeyesMail Servers

Type option, press Enter.


1=Start 2=Change 4=End(Normal) 7=Cancel(Immediately)

Opt STS Current/Previous activity

_ RUN SMTP Server


Server standing by
Checking for an available client

_ RUN POP3 Server


Starting POP3 child
Connection requested

_ RUN HTTP Server


Server program KMHTTPSRV started

F3=Exit F5=Refresh
F12=Cancel F13=KMail Jobs F14=MsgQ F15=JobQ
F17=HTTP Jobs F20=Work w/TCP Administration

37
1 Introduction

Options
Option 1=Start
This will start the KeyesMail subsystem, if it was not already active, and then
start the selected server program. The server program will bind to the
appropriate socket and wait for connection requests from PC mail clients.

Option 2=Change
This can be used to change the server setup information.

Option 4=End
This is the normal way to end a server. No additional connection requests will
be accepted. Any PC that is already connected will continue until normal
completion.

Option 7=Cancel
This can be used to immediately end a server, if it is stuck or not responding
properly.

Function Keys
Press this: To do this:
F3 Exit the program.
F5 Update the screen with current activity.
F12 Cancels the program.
F13 Shows you all the active Jobs in the KMail subsystem.
F14 Shows you all the messages in the KMail MsgQ.
F15 Shows you all the KMail Job Queues.
F17 Shows you all the HTTP Server Jobs.
F20 Shows you the Work with TCP/IP Administration menu.

38
1 Introduction

KeyesMail Server Setup


Option 2 (Change) on any of the servers will show you the Server Setup. This is
used to setup all of the KeyesMail Servers.

KeyesMail Server Setup

Type choices, press Enter.

Organization or 'Company Name' . . . . . > 'Company Name'


Server domain 'use quotes' . . . . . . . > 'company.com'
Server's IP Address . . . . . . . . . . . . . . . > '192.168.10.1' (iSeries's address)
Server Run Priority . . . . . . . . . . . . . . . . > 15 (10-70)
Number of SMTP clients . . . . . . . . . . . . > 05 (00-99)
SMTP client backlog . . . . . . . . . . . . . . . > 01 (00-99)
Number of POP3 clients . . . . . . . . . . . . > 05 (00-99)
POP3 client backlog . . . . . . . . . . . . . . . > 01 (00-99)
Number of HTTP clients . . . . . . . . . . . . > 05 (00-99)
Communication timeout . . . . . . . . . . . . > 020 (005-120 seconds)
Maximum mail size relayed . . . . . . . . . . > 02000 (00020-99999 Kbytes)
SMTP Port (usually 00025) . . . . . . . . . . > 00025
POP3 Port (usually 00110) . . . . . . . . . . > 00110

39
1 Introduction

External Mailboxes
You may define external mailboxes for commonly used recipients. You are not
charged for External mailboxes, so you can create as many as you want. They
can be maintained using item 32 External Mailboxes from the KeyesMail menu.

By: MBox Select Mailbox

Options: 1=Select 2=Change 3=Copy 4=Delete Position to:


Opt Mailbox Department/Company Name
_ ACCTNG I ACCOUNTING Accounting Department
_ BILL I SUPPORT Bill Jones
_ CHERYL I ACCOUNTING Cheryl Ladd
_ DAVE E SHIPPING Davy Crocket
_ GKELLY P RELATIVE Grandma Kelly
_ JOHN I SUPPORT John Smith
_ KRIS I SALES Kristine Jackson
_ MIKE E SPORTS Michael Jordan
_ MMOUSE E CARTOONS "R" US Mickey Mouse
_ PSMITH E XYZ COMPANY Pete Smith
_ SALES I SALES Sales Department
_ SUPPORT I SUPPORT Technical Support
More...
F3=Exit F5=Refresh F6=Add new F12=Cancel F17=Top B18=Bottom
You may move the cursor to a column and press Enter to change the sort
Make one or more selections and press Enter to return

You may wish to store external Internet addresses in the company Phonebook.
However, you can add addresses as external mailboxes, if desired. Each
mailbox can be coded with either a department or a company name, as you see
fit. Private addresses are stored in a separate file, one for each Internal mailbox.

Change

Mailbox . . . . . . . . . . . : MIKE
Department/Company : SPORTS
Name . . . . . . . . . . . . : Michael Jordan
E-mail address . . . . . : mjordan@champion.com
Available to . . . . . . . . : E Private, Dept, Everybody

Make changes and press Enter or F12=Cancel

Hint: You can send mail to everyone within a department, by coding *ALL
followed by the department name (limited to 10 characters). For this reason,
coding external addresses with a department name instead of a company name,
may prove to be useful. Anybody in the world can be considered part of some
department within your company, for mailing purposes.

Available to:
Private mailboxes will only be shown to the user that created them. Mailboxes
marked for a department will only be shown to users within the department of
the user that created them.

40
1 Introduction

Address Lists
You may define address lists that contain any number of mailboxes or Internet
addresses for sending E-mail. Address lists are maintained using item 33
Address Lists from the KeyesMail menu.

Select Address List File

Position to:
Options: 1=Select 2=Edit authority 3=Copy 4=Delete 7=Rename 8=Chg Desc

Opt File Description


_ KMLCOPY KeyesMail Address Lists - Public Copy
_ KMLLIST KeyesMail Address Lists - Public
_ KMLPRIVATE Private Address Lists

Bottom
Files must start with the letters KML to be included in this list
F3=Exit F6=Add new file F12=Cancel F17=Top B18=Bottom

Create as many files, as desired, to contain the address lists for different
purposes or groups of users. The authority for each file can be set so that only
the appropriate groups of users can access or change each set of lists.
Note: If *Public is excluded from a List file, be sure to include the profile
KMAIL as an authorized user of the file. This must be done to allow the system
to access the lists for mailing.

Select Address List Member

File: KMLLIST Position to:


Options: 1=Select 2=Edit 3=Copy 4=Delete 5=Display 7=Rename 8=Chg Desc

Opt Member Size Description


_ COPY 8192 Test KeyesMail list - Copied
_ GROUP1 8192 Group 1 committee
_ SALESFORCE 16384 All sales personnel
_ TESTLIST 8192 Test KeyesMail list

Bottom

F3=Exit F6=Add new list F12=Cancel F17=Top B18=Bottom

To select a List member enter a 1 in the option column. The program will end
and the member name will be sent back to the calling program.

41
1 Introduction

Editing an Address List


Each list can contain any number of mailboxes and Internet addresses for a
specific purpose.
While editing an Address List, you can manually enter mailbox names or
Internet addresses, left justified, on any line. The complete (user name) is
automatically included for you when you enter a mailbox on a line. The Internet
address and the full name is included for external addresses, to assist you in
identifying the recipients.

Recipient Addresses

John (John Smith)


Kris (Kristine Jackson)
<jsmiley@somecompany.com> (Jim Smiley)

Bottom
F3=Exit F17=Top B18=Bottom F19=Mailboxes F20=Phonebook
You may change any entry or clear a line to delete it

You may use F19 to open a list of mailboxes that you can select from. Or, F20
will open your default Phonebook to assist you in selecting recipients.
Recipient addresses should be entered in one of the following formats:
• account_name@domain.network
• <account_name@domain.network> (Recipients name)
• mailbox_name

You may delete recipients from the List member, by clearing lines.

42
1 Introduction

Using PC Mail Clients


PC mail clients can be easily configured to read mail from KeyesMail
mailboxes. Any of the mailboxes can be shared between 5250 terminals and PC
mail clients. This can be handy for reading your mail at home or on the road.
To do this, you must first configure and start the KeyesMail SMTP and POP3
Servers, described previously in this section. Create a new mail account in your
PC mail client or change an existing one to have the following properties:

PC Mail Account Properties

User Information
Name: Your full name.
Organization: Your company name.
E-mail address: This must match the return
address in the KeyesMail
User Setup screen.
Reply address: This can be left blank, as desired.

Server Information
Incoming mail server type: POP3
Incoming mail (POP3): Set these both to the IP address
Outgoing mail (SMTP): of your iSeries or AS/400. This
same address must also be
coded in the KeyesMail Server
Setup screen.
Account name: This must match the KeyesMail
mailbox name (upper case).
Password: This must match the password on
the KeyesMail User Setup
screen, and is case sensitive.
Secure Password Authentication This must not be used.

Server Port Numbers


Outgoing mail (SMTP): This must match the value set
in the KeyesMail Server Setup
screen, and is usually 25.
Incoming mail (POP3): This must match the value set
in the KeyesMail Server Setup
screen, and is usually 110.

Delivery
Leave mail on server You may do this, if you are
sharing this mailbox.
Remove from server You must remove the mail from
the server after a few days,
unless you are also reading
the same mail using another
PC or 5250 terminal.

Note: PC's will only read mail that has a Status of *New. If you open a piece of
mail with a 5250 terminal, the Status will be changed to Opened. If you wish to
have a PC read the same piece of mail, you must use option 2 (Change) on the
Work with KeyesMail screen to change the Status back to *New.

43
1 Introduction

Using a Web Browser


Any Web browser can be used to access the mail from KeyesMail mailboxes.
Any of the mailboxes can be shared between 5250 terminals, PC mail clients,
and any Web browser. This can be handy for reading your office mail at home
or on the road.
To do this, you must first configure and start the KeyesMail HTTP Server,
described previously in this section. The following steps are needed to activate
the HTTP Server:

Using the HTTP Server

Item 31 (User Setup)


Personal mail account:
Password: This is the password that will be
used to access your mailbox.
Max Sign-on attempts: This must be set to a value > 0
to allow access to a mailbox.
For extra security, each
mailbox will be disabled for
1 hour, if more than the
maximum Sign-on attempts
are made with the wrong
password. Be aware that the
password is case sensitive.

Item 22 (KeyesMail Servers)


Start the HTTP Server: Use option 1 on the HTTP Server
to start it.

Firewall
Open port 18110: KeyesMail will use port 18110.

Web Browser
Set your Browser to access 'your-AS/400' can be the iSeries'
http://your-AS/400:18110/ domain name or the external
IP address.

Signin screen: Use the mailbox name and the


password for that mailbox
to sign in.

44
2 Tutorial

2 Tutorial

This chapter contains a number of exercises that can be used to familiarize a


5250 terminal user with the KeyesMail system. Each exercise was designed to
be short and easy to complete in 10 to 30 minutes, and will depend on the
completion of the previous exercises. Be sure that the system has been
completely installed before starting the exercises.
We recommend that you spend the time to go through this tutorial. This will be
the easiest and fastest method of finding out what the system can do. After that,
you can refer to the other chapters for detailed information about each program.
✔ Note: Detailed instructions are given to you with a check-mark so that
you will not miss any steps. Explanations for what the program is doing
may either precede or follow each instruction.
Before you can use the KeyesMail system, a Security Administrator should have
created a mailbox named after your user-id for you.
✔ Display the KeyesMail menu, using GO KMMENU.

✔ Choose item 31 on the menu (User Setup) and press the Enter key.

If you are a Security Administrator the program will show you the Work with
KeyesMail Users screen. If this is the case, enter a 2 beside your mailbox to go
to the User Setup screen shown below:

WRKKMU User Setup Date


user-id Mailbox: Yours Time

Type choices, press Enter.


Name . . . . . . . . . . . . . . . . . . . . . . : Your Name
Department . . . . . . . . . . . . . . . . . : YOUR-DEPARTMENT
Return address . . . . . . . . . . . . . . : your-account-id@host.network
Restrict to Local Network . . . . . . . : N Yes, No
Restrict Attachments . . . . . . . . . . : P Yes, No, Partial

Mail Notification
Delivery mode . . . . . . . . . . . . . . . : B (N)=Normal, (B)=Break, ( )=None

Personal Language . . . . . . . . . . . : Leave blank to use


Personal Phonebook . . . . . . . . . . : the default system
Name heading . . . . . . . . . . . . . . . : CONTACT values ----------------
Company heading . . . . . . . . . . . . : COMPANY
E-mail heading . . . . . . . . . . . . . . . : E-MAIL

Routing entries: YOUR-USER-ID or YOUR-ACCOUNT-ID


More...
F3=Exit F12=Cancel

✔ Verify that your name and return address are correct. The system will
use both of these fields in your outbound e-mail messages. Make any
necessary corrections and press the Enter key, then F3 (Exit).

45
2 Tutorial

Creating and Editing an E-mail Message


✔ Choose item 1 on the menu (KeyesMail) and press the Enter key.

This will start the Work with KeyesMail program where you can control all of
your E-mail messages. If this is your first time, it will probably be empty.

WRKKML Work with KeyesMail Date


user-id Time
By: Date Mailbox> Yours Position to:

Options: 2=Change 3=Copy 4=Delete 5=Open 6=Print 7=Rename 8=Move


9=Reduce H=Hold
Category> In Box (K) YYMMDD
Opt Subject To/From Status Size PSAN Date
_ KeyesMail brochure Fr Kristine Kujala <sale *New 21 Y 000715

Bottom
F3=Exit F5=Refresh F6=Create new mail F10=Expand F11=View 2
F12=Cancel F17=Top F18=Bottom
Move the cursor to a column and press Enter to change the sort.

✔ Press F6 to create a new mail message.

The system will create a unique member name in your mailbox, then it will open
the new member with the Message Editor program.

EDTKML Mailbox: Yours Member: M071515432 Outbound

Sent:
To>
Subject:
Attach>
Options> Normal, From: "Your Name" <account-id@host.network>
Status: Created Category: In Box
Errors:
Message:
*. . .+. . . .1. . . .+. . . .2. . . .+. . . .3. . . .+. . . .4. . . .+. . . .5. . . .+. . . .6. . . .+. . . .7. . . .+.

F1=Functions> Full-Roll Insert Bottom


F3=Exit F4=Adjust F6=Insert/OvrTyp F10=Top F11=Bottom F24=More Keys

46
2 Tutorial

Addressing your E-mail


For new mail members, the system will automatically open the Recipient
Addresses window for you.
✔ If your message was not new, you must move the cursor up to anywhere
on the To> line and press the Enter key to open the Recipient Addresses
window, shown below.

Recipient Addresses

To "Your Name" <account-id@host.network>


CC
BC

Bottom
F3=Exit F12=Cancel F16=Add/Remove @ (no send) character
F17=Mailboxes F18=AddrList F20=Phonebook
Clear or move CC (Carbon Copy) and BC (Blind Copy), as desired.

You will learn how to use the Phonebook to address your E-mail in a later
exercise, but for now you are going to send this mail to yourself.
✔ Enter your own mailbox name (user-id) on the To row and press Enter.

Your name should appear in "double quotes" and your E-mail address in <angle
brackets>. Mailboxes are automatically addressed for you. Internet addresses
can be entered in the following formats:
• "Person's Name" <account-id@host.network>
• account-id@host.network
• <account-id@host.network> (Person's Name)

✔ Press the Enter key when you are finished and the Recipient Addresses
window will be closed.

Keying the Message


The Message Editor will automatically word wrap for you as you type beyond
the end of each line.
✔ Enter a subject on the Message Editor screen in the Subject column, for
example: "Test E-mail message". Now Tab down to the Message area
and type the following text, with a blank line separating each paragraph:
This is a short message that I will use to see how the Message Editor works. I
should learn how to use the Phonebook, the spell checker, how to copy lines,
and how to insert new information.
Be sure to include a blank line between paragraphs.
Your_first_name

47
2 Tutorial

When finished your message should look as follows:

EDTKML Mailbox: Yours Member: M071515432 Outbound

Sent:
To> Your Name <account-id@host.network
Subject: Test E-mail message
Attach>
Options> Normal, From: "Your Name" <account-id@host.network>
Status: Created Category: In Box
Errors:
Message:
*. . .+. . . .1. . . .+. . . .2. . . .+. . . .3. . . .+. . . .4. . . .+. . . .5. . . .+. . . .6. . . .+. . . .7. . . .+.
This is a short message that I will use to see how the Message Editor works.
I should learn how to use the Phonebook, the spell checker, how to copy
lines, and how to insert new information.

Be sure to include a blank line between paragraphs.

Your_first_name

F1=Functions> Full-Roll Insert Bottom


F3=Exit F4=Adjust F6=Insert/OvrTyp F10=Top F11=Bottom F24=More Keys

Inserting Text
To insert text in a paragraph you will use the F6 (Insert/OvrTyp) key. You are
going to insert the phrase "how to adjust lines," to the last sentence in the first
paragraph.
✔ Move the cursor to the beginning of the word "how" on the second line of
the first paragraph on the far right side of the screen. Press the F6 key to
start inserting. The editor will be in Insert mode.
Notice that the rest of the current line is cleared and the words "how to copy" are
moved down to the next line.
✔ Type in the missing phrase "how to adjust lines,".

Notice that word wrapping continues to work as before, except that the rest of
the sentence is pushed down while you add more text.
✔ Press F6 again to toggle the editor into OverType mode.

The rest of the text will be automatically adjusted to fill out the remainder of the
paragraph.
Note: When you press F6 key with the cursor in the middle of a line, the editor
will always switch or stay in Insert mode. It will only toggle into OverType
mode when there is no text to the right of the cursor.

48
2 Tutorial

Spell Checking
You will use the F23 (Spell Check) key to do spell checking. Before we do that,
let's make a misspelled word to be checked.
✔ Move the cursor up to the top message line and change the word
"message" to read "mesage" by removing an "s" with the Delete key.
The spell checker starts checking for spelling errors, capitalization errors, and
for duplicate words from the cursor down. So before we get started, you must
move the cursor to the beginning of the message.
✔ Press the F10 (First) key. This moves the cursor to the top of the screen.
Now press F23 to start the spell checker.
The following window should pop onto the screen:

EDTKML Mailbox: Yours Member: M071515432 Outbound

Sent:
To> Your Name <account-id@host.networkSpell Checker
Subject: Test E-mail message
Attach>
Options> This isNormal, a short From:
mesage thatName"
"Your I will use to see how the Message
<account-id@host.network>
Status: Created - - - - - - Category: In Box
Errors:
Message: mesage Spelling Error
*. . .+. . . .1. . Replace
. .+. . . .2.with
. . .+. . . .3. . . .+. . . .4. . . .+. . . .5. . . .+.Language:
. . .6. . . .+.American
. . .7. . . .+.
This is a shortSuggestions
message that I will use to see how the Message Editor works.
I should learnMASSAGE
how to use the Phonebook, the spell checker,1 how 1. to
Skip
copy
lines, and howMESSAGEto insert new information. 2. Skip All
MESSAUGE 3. Replace
Be sure to include a blank line between paragraphs.
5. Add to Main Dictionary
Your_first_name 6. Add to User Dictionary
Bottom 7. Exit Spell Checker

Move cursor to a suggestion & press Enter to select it


F1=Functions> Full-Roll OvrTyp Bottom
F3=Exit F4=Adjust F6=Insert/OvrTyp F10=Top F11=Bottom F24=More Keys

It is showing you that the word "mesage" is misspelled. One of the suggestions
should show you the correct spelling of the word.
✔ To select the suggested word "message" move the cursor down to the
line with the correct spelling, then press the Enter key.
The selected suggestion will appear in the Replace with field and (Replace) will
become the default action.
Note: Enhanced screens will use Radio buttons instead of the numbers (1-7) for
you to select an action. One way to select a Radio button action is to Tab to the
action field, cursor down, and press the Space Bar when the desired selection is
highlighted.
✔ To replace the misspelled word you may now press the Enter key.

The spell checker will then try to kick out the word "Phonebook".

49
2 Tutorial

✔ You may skip the word, leaving it as is, by simply pressing the Enter key
which will select the default action (Skip).
When the spell checker has finished checking your message, the window will
close, and return you to the Message Editor screen.

Copying Lines
You may copy individual lines of text or whole paragraphs from any message
member to the same member or to any other member using the F22 (Copy lines)
key. Let's copy the entire first paragraph to see how this works.
✔ First move the cursor to the first line of the first paragraph. It does not
matter what column the cursor is in, only the line matters.
✔ Press F22 and the line that you were on is highlighted and the cursor
moves down one line.
✔ Press F22 three more times to highlight the rest of the paragraph, plus
the blank line after it.
You now may move the cursor to any line where you wish to copy the selected
lines, in this or any other message member. We are going to copy it just above
your name, after the second paragraph.
✔ Move the cursor down to the line where you entered your name, and
press the Enter key.
A copy of the selected lines will appear at the cursor location.
✔ If you cannot see your entire message, press the Roll Up or Page Down
keys on your keyboard. You should see the following:

EDTKML Mailbox: Yours Member: M071515432 Outbound


*. . .+. . . .1. . . .+. . . .2. . . .+. . . .3. . . .+. . . .4. . . .+. . . .5. . . .+. . . .6. . . .+. . . .7. . . .+.
This is a short message that I will use to see how the Message Editor works.
I should learn how to use the Phonebook, the spell checker, how to adjust
lines, how to copy lines, and how to insert new information.

Be sure to include a blank line between paragraphs.

This is a short message that I will use to see how the Message Editor works.
I should learn how to use the Phonebook, the spell checker, how to adjust
lines, how to copy lines, and how to insert new information.

Your_first_name

F1=Functions> Full-Roll OvrTyp Bottom


F3=Exit F4=Adjust F6=Insert/OvrTyp F10=Top F11=Bottom F24=More Keys

50
2 Tutorial

Editing and Adjusting Text


Characters may be deleted from your message using the Delete key. Then you
can re-adjust or paginate the paragraph line endings using the F4 (Adjust) key.
Let's remove some of the text in the message, to see how this works.
✔ Move the cursor to the second line of the copied paragraph, to the word
"Phonebook".
✔ Use the Delete key to remove the words "Phonebook, the".

The line you are on will now be too short, the paragraph needs adjusting.
✔ Press F4 to adjust the paragraph.

Deleting Lines
Whole lines may be removed from your message using the F13 (Delete) key.
✔ Move the cursor up to the first line of the copied paragraph. It does not
matter what column the cursor is in, only the line matters.
✔ Press the F13 key four times to remove the whole paragraph, plus the
blank line after it.
Notice that the following text lines move up to take the place of each line as it is
deleted.

Sending your E-mail


You have seen how the Message Editor allows you to key and edit an E-mail
message. Now it is time to mail it.
✔ Press the F2 (Send) key.

The message line at the bottom of the screen will give you the following
instructions:
Send? Press Enter to mail in Batch mode, F2=Interactive, or F12=Cancel

✔ Press F2 a second time to send the mail Interactively.

The Message Editor will check the recipient addresses, using the routing tables,
to see if any or all are actually internal mailboxes defined in the KeyesMail
system. All internal recipients will be sent the message immediately. If there are
any external addresses, the message will be prepared for transport over the
Internet and its Status will be changed to "Out Box". These messages will be
sent through the Internet on the next mail run.
If you change your mind, before the mail has been sent, you can place your
message on Hold using option H on the Work with KeyesMail screen. This will
allow you to reopen your message, modify it, and mail it at a later time, as
desired.
✔ Press F3 (Exit) and you will be returned to the KeyesMail Menu.

51
2 Tutorial

KeyesFile Information Manager


A program called KeyesFile Information Manager is used to maintain your
Phonebook. You will be able to store a wide variety of information in your
Phonebook, including company names, contact names, phone numbers, E-mail
addresses, etc. Each user can create and use their own personal phonebooks or a
company wide phonebook can be used.
The following steps will have you open a sample KeyesFile member (called
SAMPLE) to see how the information manager works.
✔ Display the KeyesMail menu (KMMENU), using the GO KMMENU
command.
You can start the program using option 2 from this menu, however, if you prefer
you can enter a PB (Phonebook) command directly on the command line, as
follows:
✔ Enter: PB

This will start up the KeyesFile Information Manager showing you the cards in
your default Phonebook member name.
The following picture should assist you in finding the different areas on the
screen. Like all the KeyesMail programs, the information manager is sensitive
to the location of the cursor. It will perform completely different functions
depending on where the cursor is at the time you press the Enter key or a
function key.

52
2 Tutorial

Switching Members
A sample KeyesFile member containing fictitious names and addresses is
available for this exercise. We will be using it to demonstrate how you can store
and retrieve information in a number of ways. But first, you must switch to the
SAMPLE member.
To do this you need to find the location of the Member Name field. You may
want to refer to the picture on the previous page. The Member Name field is
located directly below the word *PUBLIC, in the Member Status area.
✔ Move the cursor straight up four lines from the index line, placing it into
the Member Name field and press the Enter key.
This will activate the Member Status area, allowing you to open a new member.
✔ Replace the existing member name with the name SAMPLE and press
the Enter key.

Managing Information
9 Card Tops show you the index or key to the cards. You can quickly jump to a
specific card using the Index line, but before we do that, let's see some of the
other ways of moving around.

Scrolling through the cards:


✔ Use F8 and F7 to scroll forwards and backwards through the cards.

This is one of the ways of moving around, and is normally used when the card
that you seek is only a few cards away, or you want to look at each card in a
group. For a faster scroll you can use the Page or Roll keys.
✔ Be sure that the cursor is on the Index line, then use Page Up (or Roll
Down) to scroll 8 cards at a time through the file.
There were only 11 cards in this file when we first gave it to you. As you scroll
through the file, notice that the program shows you where the bottom of the file
is, then starts the list over at the beginning of the file again.

Displaying a particular card:


If you see the top of a card that you want to display, here is another method you
can use to get to it.
✔ Move the cursor to one of the Card Tops. Be sure that you have moved
the cursor over to the right of the Card and Member Status areas.
✔ Press the Enter key.

The card top that you were on instantly moves to the front, so that you can read
the rest of the data on the card.

53
2 Tutorial

Searching for a specific card:


The computer can also find a card for you if you give it one or more characters
of a key to search for.
✔ Move the cursor to the first character of the Index line (see picture).

✔ Type a capital S followed by the Field Exit key.

The computer will move to the first card with a Company Name that starts with
the letter S.

Jumping to the first card:


Before we go on to the next step, lets jump to the first card in the file.
✔ Be sure that the cursor is on the Index line.

✔ Press F10 to jump to the first card.

You now should be on the Computer Keyes card. If not, use F8 or any other
method to position yourself there.

Changing the Index


You have been able to move around in the cards freely looking for different
companies. But, what if you were looking for a person instead of a company.
KeyesFile allows you to easily switch the key to any of the 999 card lines.
✔ Move the cursor to the Key Indicator column on the Contact line. The
cursor should be on the colon in front of Technical Support.
✔ Press the Enter key.

The Card Top area is now split, showing you both the newly selected key and the
primary key to the cards. The cards are instantly shown to you in a new order
based on the newly selected key.

54
2 Tutorial

Searching by the new key:


Searching for cards using a different key is no different than for the primary key
except that not all of the cards will necessarily be shown to you. Any card that
does not have anything keyed for the selected key is not shown.
For example, there is a card in the file for IBM Corporation. Notice however,
that if you scroll through the file, the IBM card is not shown to you. That is
because the IBM card does not have anything keyed in the Contact column.
✔ Move the cursor to the first character of the Index line, type a capital Y,
then press the Field Exit key.
This time the computer moves the first card with a Contact name that starts with
the letter Y to the front. We are looking for a card with Your Name and Your
Company Name on it.

Editing a Card
We are going to duplicate the Your Name card, so that you can change it. This
should allow everyone to use the tutorial without things getting confusing.
✔ Put the cursor on the Index line of the Your Company Name card.

✔ Press F22 to duplicate the card.

Notice that the message, at the bottom of the screen, tells you that you are
looking at the original (not the copy) of the card. The copy should be just
behind the original in the file. The original had card number 11. The copy will
have a higher card number.
✔ Press F8 to move to the copy of the card.

Making the copy your own:


The card that you just duplicated is for you, and you alone. You get to make any
changes to this card that you want.
✔ Move the cursor down into the Card Body to the Company Name line (not
the Index line).
✔ Key in your own company name over the top of Your Company Name.

✔ You may move the cursor down to the next line, using the Field Exit key.

✔ Fill in the address, your name, phone numbers, and E-mail address as
each line is labeled.
As long as you do not press the Enter key, the Index line will stay the same as it
was when you first displayed the card.
✔ Press the Enter key to update the card and the Index line.

55
2 Tutorial

Undoing Changes
Before you press the Enter key, a function key, or a Roll key, any changes to a
card are not permanently recorded. You will be able to undo those changes
using the Home key (Alt+Home on some terminals). Lets make a change to your
card and get the original back to see how this works.
✔ Use the down arrow key to move the cursor down to the Address line.

✔ Type some garbage over the top of the good address, but do not press
the Enter key.
Remember, as long as you do not press the Enter key, a function key, or a Roll
key, you can undo the changes that you make to the card.
✔ Press the Home key twice to undo the changes.

On some terminals, you must hold down the Alt key to activate the Home key.
You will be able to tell when this is necessary, when the word Home is written
on the front of the key in green.

Scrolling to additional card lines:


There are up to 999 lines of data for each card, but we have only seen 9 lines of
the cards so far. Let's move down to the other lines in this card.
✔ Move the cursor down to any line on the front card, not the Index line.

✔ Press the Page Down or Roll Up key to scroll down to the next 8 card
lines.
When you roll up, you should see the Card Heading column change to Notes at
the top of the column, and the number 009 appear in the Line Number field. A
lot of additional information can be added to the cards, including new Headings,
as desired.
✔ Press the Page Up or Roll Down key to scroll back up to the top of the
card.
We have successfully explored the KeyesFile Information Manager to the point
where you should be able to get around in any card file. For additional
information please refer to the PhoneBook chapter. It will show you how to
make subsetted lists, use the search function, add or delete lines, update card
headings, use the printing features, etc.
If you wish to end the tutorial now, just press the F3 (Exit) key. But if you stick
around a little longer, the following exercise will show you how to create a new
E-mail message directly from the KeyesFile Information Manager.

56
2 Tutorial

Sending E-mail from your Phonebook


E-mail messages can be addressed directly from the KeyesFile Information
Manager. It can start the KeyesMail program for you and send it recipient
information which will be used for addressing your message.
We will start from where you left off from the previous exercise, on your card.
If you need to get back to your card, you may do so as follows:
✔ Start the Phonebook from the KeyesMail menu or by entering PB.

This will open your default Phonebook member.


✔ Change the member name, by moving the cursor up to the Member
Name field, pressing the Enter key, then entering the desired member
name SAMPLE.
✔ Change the key to the Contact name, by moving the cursor to the Key
Indicator column at the Contact line and pressing the Enter key.
✔ Find your card, by typing the first few characters of your name on the
Index line and pressing the Field Exit key.
You should now be looking at your card in the SAMPLE KeyesFile member.

Addressing a new E-mail Message


In order to address an E-mail message from the KeyesFile Information Manager,
you must position the cursor on an E-mail address. The address can be located
anywhere in any of the 999 lines of any card, and should be entered in the
following format:
account-id@host.network
✔ Move the cursor to your E-mail address on your card. The cursor can be
anywhere on the address itself.
✔ Press F2 (Fax/E-mail).

The Work with KeyesMail program will start and should show you the messages
in your mailbox. The message line at the bottom of the screen will give you the
following instructions:
Select an entry to be copied using Option 3 or press F6 for a new entry.

✔ You have your choice of copying any existing message or creating a new
message. Either method will provide you with a new message that is
automatically addressed to the recipient on the selected card.
✔ If your "Test E-mail message" from the earlier exercise still exists, key a 3
option next to it and press the Enter key. If there are no messages
available to copy, you will have to press the F6 key to create a new
message.
The system will copy the message for you and address it. This new message is
ready for you to make any changes and mail, as desired.
✔ When you are finished, press F3 (Exit) until you have ended all the
program call levels and you are back to a command line.

57
2 Tutorial

Updating the Phonebook from your Mail


As you receive new E-mail messages, you may want to add new sender addresses
to your Phonebook. This short exercise will show you how this can be done.
✔ Start the KeyesMail program from the KeyesMail menu or by entering
KM.
✔ Open one of your E-mail messages using Option 5 on the Work with
KeyesMail screen.
From the Message Editor's main screen you can pass the current address to the
KeyesFile Information Manager. For Outbound mail, it will send the To
address. For Inbound mail, it will send the From address.
✔ Press F20 (Phonebook).

The KeyesFile Information Manager program will start and your default
Phonebook member will be opened. The message line at the bottom of the
screen will give you the following instructions:
Use F6 on Index line to add Person's name/account-id@host.network

You may use any of the KeyesFile tools to search for existing cards for the
person named, in case a card already exists in the Phonebook for this person or
company. If you find an existing card, you can enter or change the E-mail
address on that card, by typing it in as it is shown to you on the message line.
If a card does not exist, you can add a new card by moving the cursor to the
Index line and pressing the F6 key.
✔ With the cursor on the Index line, press F6 (Add).

A new card will be created with the Person's name placed in the Contact line and
the address placed in the E-mail line. You may add or update any other
information on the new card, as desired, before returning to the KeyesMail
program.
Because you really do not want to add this card to your Phonebook, the
following instructions will have you delete this card before leaving.
✔ With the bad card shown as the front card and the cursor on the Index
line, press F13 (Delete).
The message line at the bottom of the screen will give you the following
instructions:
Delete? Press Enter to confirm deletion of this card, or F12 to Cancel

✔ Press the Enter key to delete the card you just added.

✔ When you are finished, press F3 (Exit) until you have ended all the
program call levels and you are back to a command line.

58
2 Tutorial

Addressing your Mail using the Phonebook


Up to 100 different recipients can be named for each E-mail message. Your
Phonebook will provide an easy way for you to address your mail. This exercise
will show you how this works.
✔ Start the KeyesMail program from the KeyesMail menu or by entering
KM.
Both inbound and outbound mail are shown to you on the Work with KeyesMail
screen. You can tell the difference between the two types of E-mail by looking
just to the left of the To/From address column. Outbound messages will display
To and a recipient's address, whereas, inbound messages will display Fr and the
sender's address.
✔ Open one of your outbound test E-mail messages using Option 5, this will
start the Message Editor.
✔ Move the cursor up to the To> line and press the Enter key to open the
Recipient Addresses window on your screen.

Recipient Addresses

To "Your Name" <account-id@host.network> 01


CC
BC

Bottom
F3=Exit F12=Cancel F16=Add/Remove @ (no send) character
F17=Mailboxes F18=AddrList F20=Phonebook
Clear or move CC (Carbon Copy) and BC (Blind Copy), as desired.

It will probably already have your name and address on the screen, as shown
above. Now we are going to add additional recipients.
✔ Press F20 (Phonebook) from this window.

The KeyesFile Information Manager program will start and your default
Phonebook member will be opened. The message line at the bottom of the
screen will give you the following instructions:
Use F20 on a card to select it or on a card top to select a series of cards

To select a card you must move the card to the front and position the cursor in
the Card Body area before pressing F20. You may select additional recipients
by moving new cards to the front and again pressing F20 with the cursor in the
Card Body. Up to 100 recipients can be selected in this manner.
If you wish to select a series of cards, you would position the cursor on the Card
Top of the first card in the series and press F20. The message line at the bottom
of the screen will change to:
Press Enter with cursor on last card in this series to select, or F12=Cancel

59
2 Tutorial

You then use the Roll or Page keys until you can see the last card in the series.
You move the cursor to the Card Top of the last card that you wish to select and
press the Enter key. All the cards from the first to the last will be selected.
✔ If there are a few cards with addresses in your default Phonebook, go
ahead and select some of them for this exercise. Otherwise, switch to
the SAMPLE KeyesFile member and select some of the recipients from
that member.
✔ When you have finished selecting recipients, press F3 (Exit).

You will be returned to the Recipient Addresses window. All the selected
recipient addresses will be placed on the screen underneath any existing
addresses.

Recipient Addresses

To "Your Name" <account-id@host.network> 01


CC “Technical Support at Computer Keyes” <support@ckeyes.com>
“Scott Pederton at Corny Data Services” <spederton@corny.ny>
“Sam Searsucker at DCMU” <same@dcmu.org>
BC

Bottom
F3=Exit F12=Cancel F16=Add/Remove @ (no send) character
F17=Mailboxes F18=AddrList F20=Phonebook
Clear or move CC (Carbon Copy) and BC (Blind Copy), as desired.

If you have opened the mail that you sent to yourself, an 01 will appear to the
right of your address, as shown above. This will show you how many internal
recipients have read your message.
The CC code, found underneath the To heading, designates carbon copy. These
recipients will be treated just the same as the original recipient, except that they
will be listed as carbon copy recipients in the message.
The BC code, may be moved up to any recipient marking it and all addresses
below it as blind copies. BC must remain below the CC recipients. Blind copy
recipients will receive the same message, but will not be listed as recipients in
the message itself.
✔ Press the Enter key after moving BC to the desired position.

The Recipient Addresses window will be closed. You can go back and see or
update the recipients at any time by moving the cursor back up to the To> line
and pressing the Enter key again.
✔ When you are finished, press F3 (Exit) until you have ended all the
program call levels and you are back to a command line.

60
2 Tutorial

Sending Attachments with your Mail


Up to 99 different attachments can be prepared and sent with each of your E-
mail messages. You can send any type of iSeries file or object as an attachment,
but be aware that large attachments (over one megabyte in size) may take a long
time to prepare and transmit over a switched circuit.
This exercise will prepare a source member as an attachment with your test
message.
✔ Start the KeyesMail program from the KeyesMail menu or by entering
KM.
✔ Open one of your outbound test E-mail messages using Option 5 on the
Work with KeyesMail screen.
✔ Move the cursor down to the Attach> line and press the Enter key to
open the Attachments (Outbound) window on your screen.

Attachments (Outbound)

Options: 1=Save attachment as 2=Change 4=Remove 5=Display

Opt Filename Description Size Type RL

F3=Exit F6=New F10=Top F11=Bottom F12=Cancel

✔ Press F6 (New) and the Get Attachment from window will open.

Get Attachment from

Type: _ 1=PC/Text 2=PC/Binary 3=PF


4=SrcPF 5=SplF 6=SavF

Enter Type or F12=Cancel

✔ Key a 4 (Source Physical File) in the Type field.

61
2 Tutorial

After selecting a type, the Get Attachments from screen will be expanded to
include additional fields.
The source file member that you will be preparing as an attachment, in this
exercise, is called CPYPFSF. We included this member with the system because
it is a set of instructions that you could send to someone that you wanted to send
an iSeries Save File to. These instructions would tell the recipient how to restore
and install a Save File onto their iSeries, assuming they did not have KeyesMail
software to do it for them.
Notice the angle brackets around <Filename>. This designates a hot spot. Hot
spots in the KeyesMail programs typically open additional windows or programs
that assist you. In this case, the <Filename> hot spot can be used to open a
browser program.
✔ If you wish to explore this feature, go ahead and try it by moving the
cursor up to the hot spot and press the Enter key, otherwise:
✔ Fill out the parameters as shown below, changing the library name if
necessary, and press the Enter key.

Get Attachment from

Type: 4 1=PC/Text 2=PC/Binary 3=PF


4=SrcPF 5=SplF 6=SavF

<Filename> Description
QCLSRC Copy PF to SavF instructions
Library Member
KMLIB CPYPFSF
Translate: 2 0=None 1=AtoE 2=EtoA 3=CSV
Compress: _ 0=None 1=Fast 2=Normal 3=Max
Encrypt: _ 0=None 1=ZipStd 2=ZipAdv

Enter From information or F12=Cancel

The attachment will be prepared for transport over the Internet and added to
your message. The screen should show the following:

Attachments (Outbound)

Options: 1=Save attachment as 2=Change 4=Remove 5=Display

Opt Filename Description Size Type RL


_ QCLSRC Copy PF to SavF instructions 4141 SrcPF 92
Fr: KMLIB CPYPFSF Translt: EtoA

Bottom
F3=Exit F6=New F10=Top F11=Bottom F12=Cancel

✔ This exercise is finished, so you can press F3 (Exit) until you have ended
all the program call levels.

62
2 Tutorial

Saving Attachments from your Mail


As you receive E-mail from the Internet, you will probably be sent messages
with attachments.
The attachments can be any kind of iSeries, AS/400 or PC objects. When you
save iSeries objects, you will tell the program what library, file, member, or
output queue to place the attachments in. When you save PC objects, you will
tell the program what file name and folder to place the attachments in, so they
will be accessible to a PC.
You can also display the text of any attachment. This can be especially useful
for viewing PC word processing documents.
This exercise will show you how to save an attachment onto your iSeries. We
will be saving the attachment that you prepared in the previous exercise with
your test E-mail message.
✔ Start the KeyesMail program from the KeyesMail menu or by entering
KM.
✔ Move the cursor over to the PSA column and press the Help key.

This will bring up a screen that describes what is listed under the PSA column
heading. Position sensitive help information is available for all of the KeyesMail
programs.
✔ Press F12 or F3 to exit the help screen.

You will see that a "Y" is coded on the screen in the PSA column to show which
messages have attachments in them.
✔ Open the outbound test E-mail message that has the attachment that you
prepared in the previous exercise, using Option 5 on the Work with
KeyesMail screen.
✔ Move the cursor down to the Attach> line and press the Enter key to
open the Attachments window on your screen.

Attachments (Outbound)

Options: 1=Save attachment as 2=Change 4=Remove 5=Display

Opt Filename Description Size Type RL


_ QCLSRC Copy PF to SavF instructions 4141 SrcPF 92
Fr: KMLIB CPYPFSF Translt: EtoA

Bottom
F3=Exit F6=New F10=Top F11=Bottom F12=Cancel

✔ Enter a 1 (Save attachment as) in the Option column and press the Enter
key.

63
2 Tutorial

The Save Attachment as window will open on your screen.

Save Attachment as

Filename Encode
QCLSRC QUOTED
To: Folder, Library(Member) or Output Queue
KMLIB(CPYPFSF)
Type: 4 Rec Len: 92 Translate: 2 Replace: N

Types: 1=PC/Text 2=PC/Binary 3=PF (R/L)


4=SrcPF (R/L) 5=SplF 6=SavF
Translation: 0=None 1=AtoE 2=EtoA 3=UnEncrypt

Give destination and press Enter or F12=Cancel

Normally, all of the parameters will not already have values filled out for you.
They are on this screen only because this attachment was originally defined by
you, in the previous exercise.
When attachments are created with the KeyesMail program, it tracks and sends
more information about the attachments than PC E-mail programs do. That is
because PC programs only have to deal with file names and directories, with
their attachments. The iSeries must concern itself with file names, libraries,
member names, record lengths, output queues, and so on.
We are going to save this attachment to your QTEMP library into a physical file
named TESTFILE rather than back into the source file that it came out of.
✔ Change the file name to TESTFILE.

✔ Tab to the To: field and change it to read QTEMP(TESTMBR).

The original file was a source file with a 92 byte record length. The physical file
that we will be creating, will only need to have an 80 byte record length,
however, because there will not be any sequence numbers or dates for each
record in the file (that source files have).
✔ Change the Type: field to 3 (PF) and change the Rec Len: field to 80.

The original data that you placed in the attachment was translated from EBCDIC
to ASCII so that PC users could read the instructions. When we save the
attachment back to the iSeries, you will want to translate it back into EBCDIC so
that you can read it on your iSeries.
✔ Change the Translate: field to 1 (AtoE).

64
2 Tutorial

Your screen should now look as follows:

Save Attachment as

Filename Encode
TESTFILE QUOTED
To: Folder, Library(Member) or Output Queue
QTEMP(TESTMBR)
Type: 3 Rec Len: 80 Translate: 1 Replace: N

Types: 1=PC/Text 2=PC/Binary 3=PF (R/L)


4=SrcPF (R/L) 5=SplF 6=SavF
Translation: 0=None 1=AtoE 2=EtoA 3=UnEncrypt

Give destination and press Enter or F12=Cancel

✔ Press the Enter key.

The attachment will be translated to EBCDIC and saved as an iSeries physical


file. To see the results, you would have to return to a command line and enter
the following command:
Enter: dsppfm file(qtemp/testfile) mbr(testmbr)
This will start IBM's Display Physical File Member program where you can roll
through the data to see what it says.
But don't bother! The following exercise will allow you to display the
attachment on your screen.

Displaying Attachments
Rather than trying to view the physical file member, you can view the attachment
data directly.
✔ Enter a 5 (Display) in the Option column in the Attachments window for
the same attachment and press the Enter key.
The Display an Attachment window will open on your screen.

Display an Attachment

Filename: TESTFILE
Encoded: QUOTED
Description: Copy PF to SavF instructions

Translate: 1 0=None 1=AtoE

Enter translation and press Enter or F12=Cancel

✔ Change the Translate: field to 1 (AtoE) and press Enter.

The attachment will be translated into EBCDIC, placed temporarily into a


physical file in your QTEMP library and displayed on your screen.

65
2 Tutorial

✔ When you are finished, press F3 (Exit) until you have ended all the
program call levels.
This concludes the tutorial. You can refer to the following chapters in this user's
guide for additional information about the KeyesMail programs.

66
3 KeyesMail

3 KeyesMail

Each user may track and control their e-mail using the Work with KeyesMail
program (shown below). This program can be started from the KeyesMail menu
or by entering KM on a command line.

WRKKML Work with KeyesMail Date


user-id Time
By: Date Mailbox> John Position to:

Options: 2=Change 3=Copy 4=Delete 5=Open 6=Print 7=Rename 8=Move


9=Reduce H=Hold S=Spam
Category> In Box (K) YYMMDD
Opt Subject To/From Status Size PSAN Date
_ Please send KeyesFax Fr Kristine Kujala <kris *New 1 P 000908
_ Re:How to Fax an AFP To Chris Marrett <cmarr Out Box 1 000908
_ How to Fax an AFPDS Fr Chris Marrett <cmarr Answered 2 000908
_ Re:Forms overlay que To Eldon Benton <EBent Sent 1 000907
_ Forms overlay questio Fr Eldon Benton <EBent Answered 922 Y 000907
_ Re:KeyesPunch Inform To Ginny Bunn <ginny@ Sent 52 Y 000907
_ KeyesPunch Informati Fr Ginny Bunn <ginny@ Answered * 000907

Bottom
F3=Exit F5=Refresh F6=Create new mail F10=Expand F11=View 2
F12=Cancel F17=Top F18=Bottom
Move the cursor to a column and press Enter to change the sort.

Cursor positioning
A number of KeyesMail's functions are performed by moving the cursor to a
specific position and pressing the Enter key. For example, you can change the
sort order of the messages as they are shown to you, by moving the cursor to one
of the columns (Subject, To/From, Status, or Date) and pressing the Enter key.

Subject column
This shows you the first part of the subject for your e-mail messages. To change
this field, you can either open the message and change it using the Message
Editor, or simply use option 2 (Change) on one or more messages. Option 2
gives you a quick method of creating threads of conversation.
You may sort the messages by subject by moving the cursor to one of the fields
in the Subject column and pressing the Enter key. You will then be shown all
messages with that subject.

67
3 KeyesMail

Status column
This will show you the disposition of each of your e-mail messages. You may
sort the messages by this column by moving the cursor to the Status field and
pressing the Enter key. The Status is automatically maintained by the system,
but can be manually changed to any desired value using option 2 (Change) on
one or more messages.
*Accept This message was only partially retrieved. The rest of the
message has been accepted and should be retrieved on the next
mail run.
*Auto This is a new message that is being created by an API. If it
remains in *Auto status, then something went wrong.
*Failed The system tried to mail the message, but it failed. You may
open the message to read the reason for failure in the Errors
field.
*New This is a new inbound message that you have not opened yet.
*Partial This is a new inbound message that was only partially
retrieved. This happens when a message is larger than the
Max mail size auto retrieved threshold set in the KeyesMail
System Setup. You can either accept or reject the rest of the
message by opening the mail and setting your response in the
Options window.
*Reject This message was only partially retrieved. The rest of the
message was rejected and will not be retrieved.
Answered This is an inbound message that has been replied to.
Created This is a message that was created using F6 but has not been
placed in (Out Box) to be mailed yet.
Delayed The delivery of this message has been delayed.
Deliverd This outbound message has been delivered to the recipient.
This information is sent back to you when you set the When
Notify option value to either Successes or Both.
Expanded This outbound message has been expanded and sent to a list of
recipients by a mailing list program.
Forward This message has been prepared to be forwarded, but has not
been mailed yet.
Held This outbound message has been held. You must reopen the
message and press F2 to mail it.
Out Box This message will be sent on the next mail run.
Opened This is an inbound message that has been opened and read, but
has not been replied to or forwarded.
Passed This is an inbound message that has been forwarded or passed
on to someone else.
Relayed This outbound message has been relayed to a system that does
not have Delivery Status capability.
Reply This message has been prepared as a reply but has not been
mailed yet.
Sent This outbound message has been mailed.

68
3 KeyesMail

To/From column
This shows you the address for the sender (for inbound mail) or recipient (for
outbound mail). To change this field, you must open the message and change it
using the Message Editor. You may sort the messages by this column by moving
the cursor to the To/From field and pressing the Enter key.

Size column
This shows you how large each e-mail message is in K bytes. One K is defined
as 1024 bytes. The size will read * if you have purged the ASCII mail member,
using option 9 (Reduce).

PSAN column
The PSAN column shows you additional information about each of your e-mail
messages.
• P Priority (Low, Normal, High)
• S Sensitivity (Normal, Personal, Confidential)
• A Attachments (Yes, No)
• N Notification (Normal, Failures, Successes, Both)

Date column
This is the date that each e-mail message was originally received or created. If
you copy, reply, or forward an e-mail message, the new message will have the
new date.
Note: If you delete a message, it will be moved to the *Deleted category and
also given a new date. The new date is used so that the message can be purged
after the appropriate number of days, as specified in the Mail purge delay field
in the setup for each mailbox.

69
3 KeyesMail

Category>
All mail arrives in your mailbox in the category titled "In Box", except for mail
that the Spam filter routes to the "*Spam" category. You may copy or move
your mail into any category that you desire.
You can change the category of the messages that are being shown to you by
moving the cursor to the Category line and pressing the Enter key. A window
will open showing you all the categories that you have any mail in, as shown
below:

WRKKML Work with KeyesMail Date


user-id Time
By: Date Mailbox> John Position to:

Options: 2=Change 3=Copy Select Category


4=Delete 5=Open 6=Print 7=Rename 8=Move
9=Reduce H=Hold Position to
Category> In Box *ALL (K) YYMMDD
Opt Subject In Box
To/From Status Size PSAN Date
_ Please send KeyesFax Fr *Deleted
Kristine Kujala <kris *New 1 P 000908
_ Re:How to Fax an AFP To *Spam
Chris Marrett <cmarr Out Box 1 000908
_ How to Fax an AFPDS Fr Negotiations
Chris Marrett <cmarr Answered 2 000908
_ Re:Forms overlay que To Personal Mail <EBent
Eldon Benton Sent 1 000907
_ Forms overlay questio Fr Save
Eldon Benton <EBent Answered 922 Y 000907
_ Re:KeyesPunch Inform To Technical
Ginny BunnSupport
<ginny@ Sent 52 Y 000907
_ KeyesPunch Informati Fr Ginny Bunn <ginny@ Answered * 000907

Bottom
Cursor to selection
Bottom
and press Enter
F3=Exit F5=Refresh F6=Create new mail F10=Expand F11=View 2
or F12=Cancel
F12=Cancel F17=Top F18=Bottom
Move the cursor to a column and press Enter to change the sort.

To make a selection, move the cursor down to the desired category and press the
Enter key.
Note: Mail messages are placed in the *Deleted category when they are deleted.
Mail is placed in the *Spam category automatically by the Spam filter and can
be sent there manually using the S (Spam) option. Deleted and Spammed mail
are automatically purged from the system after the Mail purge delay has passed.
You may specify the number of days before purging in the setup for each
mailbox. The default is 7 days. You can undelete a message by moving it to a
different category. You can un-Spam a message by moving it out of the *Spam
category.

By:
This shows the currently selected sort order of the e-mail messages. You may
change the sort order by moving the cursor to one of the columns (Subject,
To/From, Status, or Date) and pressing the Enter key.

70
3 KeyesMail

Mailbox>
The Work with KeyesMail program defaults to showing you your own mailbox
when it is started. You may open other mailboxes that you have been given
access to, by typing the name in the Mailbox field and pressing Enter.
You may select from a list of mailboxes by moving the cursor to the Mailbox
field and pressing Enter. A window will open showing you all the mailboxes
that you have access to, as shown below:

WRKKML Work with KeyesMail Date


user-id Time
By: Date Mailbox> John Position to:

Select Mailbox
Options: 2=Change 3=Copy 4=Delete 5=Open 6=Print 7=Rename 8=Move
Position to
9=Reduce H=Hold
POSTMASTER
Category> In Box (K) YYMMDD
ACCOUNTING
Opt Subject To/From Status Size PSAN Date
BILL
_ Please send KeyesFax Fr Kristine Kujala <kris *New 1 P 000908
JOHN
_ Re:How to Fax an AFP To Chris Marrett <cmarr Out Box 1 000908
KRIS
_ How to Fax an AFPDS Fr Chris Marrett <cmarr Answered 2 000908
SALES
_ Re:Forms overlay que To Eldon Benton <EBent Sent 1 000907
SUPPORT
_ Forms overlay questio Fr Eldon Benton <EBent Answered 922 Y 000907
_ Re:KeyesPunch Inform To Ginny Bunn <ginny@ Sent 52 Y 000907
_ KeyesPunch Informati Fr Ginny Bunn <ginny@ Answered * 000907

Bottom
Cursor to selection
and press Enter
Bottom
or F12=Cancel
F3=Exit F5=Refresh F6=Create new mail F10=Expand F11=View 2
F12=Cancel F17=Top F18=Bottom
Move the cursor to a column and press Enter to change the sort.

To make a selection, move the cursor down to the desired mailbox and press the
Enter key.
Note: A user may only open their own mailbox unless they have been given
specific access to another mailbox using the User Setup program, as described in
the Introduction section. Users with a special authority of *SECADM may open
any other mailbox, but may not read any mail that is marked Personal.

Position to:
Type one or more characters in the Position to field and press Enter to jump
directly to a specific place in the list of e-mail messages. This field works with
the currently selected sort.

71
3 KeyesMail

Options
Option 2=Change
You can change the Subject and/or the Status field of one or more messages
using option 2. A window will open on the screen (shown below) to let you
complete the change.

Change Screen

Subject> To/From Status Date


Re:How to Fax an AFP To Chris Marrett <cmarr Sent 000908
How to Fax an AFPDS Fr Chris Marrett <cmarr Answered 000908

Bottom
New Subject: Press Enter with cursor on a Subject to select it.
*Same
New Status: *Same

Give new Subject or Status and press Enter or F12=Cancel

You can type in a new subject, or you can easily pick up an existing subject by
moving the cursor up to one of the messages and pressing Enter. That subject
will be copied into the New Subject field for you to edit, as desired. This gives
you a quick way of making conversation threads using the Subject column.
Changing the status can give you a method of setting messages aside for special
attention or again as a way of making conversation threads.
Note: The Status field, if changed, may affect auto purging functions. The
Purge KeyesMail program will only purge messages with a status of Answered,
Deliverd, Expanded, Opened, Passed, Relayed, *Reject, Sent, or <blank>, when
told to purge *NORMAL messages. You would need to purge *ALL messages,
in order to purge any of the other statuses.
Messages that have a status of Template will not be purged even if you use the
*ALL type of purge. You will have to manually delete Templates, if you want to
get rid of them.

72
3 KeyesMail

Option 3=Copy
You can copy one or more messages to another mailbox or category using option
3. A window will open on the screen (shown below) to let you direct where the
selected messages should be copied.

Copy/Move

Subject To/From Status Date


Re:How to Fax an AFP To Chris Marrett <cmarr Sent 000908
How to Fax an AFPDS Fr Chris Marrett <cmarr Answered 000908

Bottom
To: <Mailbox> <Category> Notify Rcvr
JOHN In Box Y

Give destination and press Enter or F12=Cancel

You may type in a new mailbox or category, or use one of the <hot spots> to
assist you in copying the messages to an existing mailbox or category.
To use a hot spot, move the cursor to the word <Mailbox> or <Category> and
press the Enter key. A selection window will open on the screen with all of the
available entries. To select one, move the cursor to the desired entry and press
the Enter key.

Option 4=Delete
This option will delete the message from the mailbox. If the mailbox has a
Delay before purge value, the mail will be temporarily moved to the *Deleted
category, and only purged after the delay. You can easily undelete a message by
moving it out of the *Deleted category.

Option 5=Open
This option opens up your message with the Message Editor so that you can edit,
read, reply, or forward the mail. See Message Editor in the following section for
more information.
Note: You cannot open any message that has a status of Out Box or if it is
actively being transmitted. You must put it on Hold to open it.

Option 6=Print
You may print a message to any iSeries printer using this option.

Option 7=Rename
You can rename an e-mail message to any unique name, as desired. This option
is especially useful for naming messages that are created as Templates.

73
3 KeyesMail

Option 8=Move
You can move one or more messages to another mailbox or category using
option 8. A window will open on the screen (shown previously) to let you direct
where the selected messages should be moved.
You may type in a new mailbox or category, or use one of the <hot spots> to
assist you in moving the messages to an existing mailbox or category.

Option 9=Reduce
You can reduce the amount of disk storage that your messages have taken using
option 9. The ASCII member, used for sending the message through the
Internet, will be deleted from the system. This will remove any attachments,
which can free up substantial amounts of disk storage. Only the smaller member
containing readable EBCDIC text will remain for future referencing.
For outbound e-mail you can reestablish the ASCII member, after it has been
deleted, by opening the message, preparing any attachments again, and using
option 2 to prepare the message for sending.
Warning! For inbound e-mail, be sure to save any attachments before using this
option. The attachment data will not be retrievable after the ASCII member is
deleted.

Option H=Hold
You cannot open any message that has a status of Out Box. However, you can
use this option to change the status to Held so that it can be opened.

Option S=Spam
This option moves a message to the *Spam category. The e-mail address will be
recorded and considered spam on future e-mails to the current mailbox.
If you move a spammed e-mail out of the *Spam category, the e-mail address
will be recorded and not considered spam on future e-mails to the current
mailbox.
Mail in the *Spam category will be purged after the Mail purge delay has been
reached.

User Defined Options


A CL program called KMLUSROP (KeyesMail User Options) has been
provided to you so that you can create your own custom user options. Any
option (alpha or numeric) that the operator types in the option column, that is not
one of the predefined options, will be sent to the KMLUSROP program to check
if it is user defined.
Please see the program located in the source file QCLSRC in the KeyesMail
Program library (usually KMLIB) for additional instructions.

74
3 KeyesMail

Function keys
Press this: To do this:
Roll/Page keys Scrolls through the entries in the KeyesMail Queue.
F3 Exit the program.
F5 Refresh or update the entries on the screen.
F6 Create a new mail message.
F10 Expands the data on the screen to show you additional
information about each entry.
F11 Toggles the display to show different fields for each entry.
F12 Cancels a function returning you to the previous screen.
F17 Positions you to the top of the list of entries.
F18 Positions you to the bottom of the list of entries.

E-mail Security
No one else may access the messages in your mailbox unless you or a security
administrator specifically gives them the authority. You can give other users
temporary access using the User Setup program. Please see Adding User
Mailboxes in the Introduction section for more information.
Note: Users with a special authority of *SECADM may access all other
mailboxes. However, only the owner of a mailbox can open any mail that has
been marked as Personal. Only the owner of a mailbox or security
administrators can open any mail that has been marked as Confidential.

75
3 KeyesMail

- - - - blank page - - - -

76
4 Message Editor

4 Message Editor

The Message Editor was designed to be a fast and extremely easy to use editor
for reading and preparing e-mail messages.
You start the editor by opening a message from the Work with KeyesMail screen
using option 5 (Open) or F6 (Create new mail). You can also start the editor
using F2 (Fax/E-mail) from the KeyesFile Information Manager as described in
the Phonebook section.

Launching E-mail from KeyesFile


KeyesFile, the information manager, will automatically call the Message Editor
for you when you move the cursor to an e-mail address in your data, and press
F2 (Fax/E-mail). The address must be in the form name@host.network with the
"@" character embedded in it to be recognized as an address. For example:
johndoe@somecompany.org

To send an e-mail message:


When you press F2 on an e-mail address, the system will search for the card
heading that matches the company name and contact definition. The appropriate
card heading is defined in the user or system setup for the Phonebook.
1. Place the cursor anywhere on an e-mail address.
2. Press F2 (Fax/E-mail).
KeyesFile will save the company name, contact, and address in a data
queue and call the Work with KeyesMail program.
3. You will be given the chance to either create a new mail message using F6,
or copy an existing mail member using option 3. The new or copied mail
will be addressed appropriately and opened for you to edit the message.
4. After you have finished editing and sending the new message, you may end
the Work with KeyesMail program using F3 (Exit). You will be returned to
the Phonebook where you left off.
Please see the Phonebook section of this manual for information on how to use
the KeyesFile Information Manager.

77
4 Message Editor

The Message Editor Screen

EDTKML Mailbox: JOHN Member: M090815432 Outbound

Sent: Fri, 08 Sep 2000 16:11 -0700


To> Chris Marrett <cmarrett@acompany.org>
Subject: Re:How to Fax an AFPDS Spool File
Attach>
Options> Normal, From: "John Doe" <john@somecompany.com>
Status: Sent Reply Category: In Box
Errors:
Message:
*. . .+. . . .1. . . .+. . . .2. . . .+. . . .3. . . .+. . . .4. . . .+. . . .5. . . .+. . . .6. . . .+. . . .7. . . .+.
Chris,

Yes, to fax a spool file you can call our API (FAXAFPDS) or simply place the spool file
in our FAXCOM output queue. Either method will cause the system to automatically
convert the AFPDS spool file to a FAX image and send it.

John :-)

--------------------
>Can we fax AFPDS spool files using the KeyesFax system.

F1=Functions> Full-Roll Insert Bottom


F3=Exit F4=Adjust F6=Insert/OvrTyp F10=Top F11=Bottom F24=More Keys

The Message Editor screen contains all the fields necessary to send a complete
e-mail message through the Internet, with any attachments that you wish to
include. The message text section will expand to include up to 999 lines of text,
as you type.
Note: A reply mark (>) is automatically included to the left of the original text
when you make a reply to a message. You may leave any reply lines in your
response that would help remind the recipient what the response is about. You
should remove any lines that are redundant or superfluous using F13 (Delete) or
F19 (Clear below cursor).

Getting Help
The Message Editor contains a number of Help screens to assist you in using the
program. The Help key is position sensitive. The location of the cursor when
you press the Help key determines what information is displayed. Using the Roll
keys, you can move through as much of the Help text as you need.

Hot Spots
Hot spots within the Message Editor are identified by their Pink color or by a
bracket (>) character, as in To> as shown above. Hot spots bring up other
windows or programs to assist you. They are activated by placing the cursor on
the hot spot and pressing the Enter key.

78
4 Message Editor

Function keys
Press this: To do this:
Roll keys Scroll to the previous or next page of the message.
F1 Opens a window on the screen to assist you in selecting some
of the following functions.
F2 The recipient addresses are checked. The message is
immediately sent to any internal mailboxes named. If any
external addresses are found, the message is prepared for
Internet transport and placed in Out Box status to be sent on
the next mail run.
F3 Exits the Message Editor.
F4 Adjusts the current paragraph on word boundaries.
F6 Toggles insert/overtype mode at the current cursor position.
F7 Displays the previous e-mail message.
F8 Displays the next e-mail message.
F9 Toggles the roll amount between Full screen and Half screen
rolls.
F10 Brings the cursor to the first message line.
F11 Brings the cursor to the last message line.
F12 Ends the previous function request.
F13 With the cursor in the Message text area, it will delete the
current line and move the remaining lines up.
F14 Will create a Reply for the current e-mail message. The
original text will have reply marks (>) added. The original
From: or Reply-To: addresses will be copied to the recipient
address list.
F15 Will create a copy of the current message, with any
attachments, to be Forwarded to a new recipient.
F16 Adds the Signature text for the current mailbox to the message
at the current cursor position.
F17 When the cursor is in the Message text area, it will toggle the
reply mark (>) ON or OFF of the message line.
F18 Displays the Internet header information for inbound e-mail
messages.
F19 Clears the entire message below the cursor, to allow for new
text.
F20 Opens up your default Phonebook and passes it the current e-
mail address so that it can be updated.
F21 Prints the e-mail message to any iSeries printer.
F22 Selects the current line of text to be copied.
F23 Activates the spell checker starting at the current cursor
position. It will check for capitalization errors, duplicate
words, and for spelling mistakes.
F24 Displays additional function keys available for the current
display.

79
4 Message Editor

The Message Editor Fields

Sent:
This will show you the date and time that the e-mail message was sent.

From:
On inbound mail only, this field shows you who sent the message.

To>
On outbound mail only, this shows you the first recipient of the e-mail. If you
move the cursor up to the To> line and press the Enter key, the following
window will open on your screen:

Recipient Addresses

To "Chris Marrett" <cmarrett@acompany.org>


CC “Joe P. Doright, Executive Manager of Data Processing” <joed@yourcompan+ 01
y.com>
*ALL Accounting 04
BC

Bottom
F3=Exit F12=Cancel F16=Add/Remove @ (no send) character
F17=Mailboxes F18=AddrList F20=Phonebook
Clear or move CC (Carbon Copy) and BC (Blind Copy), as desired.

You may manually address the mail with up to 100 mailboxes, departments,
address lists, or Internet addresses. Only one entry is allowed per line.
F17 opens a list of internal mailboxes that you can select from.
F18 lets you create and/or select an address list.
F20 opens your default Phonebook where you can select recipients.
You may select everyone in a department by entering *ALL followed by the
department name, or to all internal mailboxes using just *ALL.
Ex: *ALL Accounting will send to everyone in accounting.
You may blank out any unwanted recipients using a Field Exit key. You may
move the CC and BC codes to the desired location to show which recipients are
to get carbon copies or blind copies. Blind copy recipients are not announced to
the others.
A plus sign (+) in the far right hand column will allow you to continue an
address onto a second line.
The number at the right hand side of the window is a count of the number of
internal recipients that have opened their copy of your e-mail message.

80
4 Message Editor

Subject:
This is used to describe the subject matter of the e-mail message.

Attach>
This shows you the first attachment, if any, that was defined for this e-mail
message. If you move the cursor to the Attach> line and press the Enter key, an
Attachments window will open on your screen. Please see Attachments
(Inbound) and Attachments (Outbound) later in this section for more information
on how to send or receive multiple attachments with your e-mail messages.

Options>
This shows you the options that have been selected for this e-mail message. If
you move the cursor to the Options> line and press the Enter key, the following
window will open on your screen:

Options

From: "John Doe" <john@somecompany.com>


Sender:
Reply-To:
Resent-From:
Fill out extra fields only if different than From:

Priority: N Low, Normal, High


Sensitivity: N Normal, Personal/Private, Confidential
Auto Purge: N No, Yes
When Notify: N Normal, Failures, Successes, Both
Read Recpt: N No, Yes (Request a read receipt)

Enter options and press Enter or F12=Cancel

● The From address is a required field that defaults to the mailbox Return
address value. The additional addresses are optional which you can use to
further define who the original Sender was, who to Reply to, and who the
mail was Resent from, if they are different than the From address.
● The Priority field is used to specify how important the message is or how
soon it should be mailed.
● The Sensitivity field can be used to prevent others from reading the message.
Personal or private messages (P) can only be read by the owner of a mailbox.
Confidential messages (C) can only be read by the owner or by security
administrators.
● The Auto Purge field can be used to have the message automatically deleted
from the KeyesMail system after it is mailed.
● The When Notify field can be used to have the Internet SMTP mail system
notify you of the delivery status of this mail member.
● The Read Recpt field can be used to request a Read Receipt from the
recipient of this mail. If the recipient allows it, a receipt will be sent back to
the return address, when they open their mail.

81
4 Message Editor

Status:
This field shows the last 3 statuses of the e-mail message. The most current is
the left most status.

Errors:
If the message fails to be sent or delivered, the reason for failure can be found
here.

Message:
You may enter up to 999 lines of text in the message area. Each line is 76
characters wide. As you continue typing beyond the end of each line, the
program will automatically word wrap for you. You should place a blank line
between paragraphs.
If you are making a reply, the original text will be included in the message with
reply marks (>) to the left of each line. You may enter your reply above or
between the original text by toggling to Insert mode using F6 with the cursor in
the desired location.

F1=Functions>
You may press a function key, to perform any available function. If you move
the cursor to the F1=Functions> line and press the Enter key, or simply press the
F1 key the following window will open.

EDTKML Mailbox: JOHN Member: M090815432 Outbound

Sent: Fri, 08 Sep 2000 16:11 -0700


To> Chris Marrett <cmarrett@acompany.org>
Subject:Select Function
Re:How to Fax an AFPDS Spool File
Attach>
Mail this message
Options> Normal, From:F2 "John Doe" <john@somecompany.com>
Previous mail
Status: Sent F7Reply Category: In Box
Next mail message
Errors: F8
Toggle Roll F/Half
Message: F9
*.Create
. .+. . . a.1.Reply F14
. . .+. . . .2. . . .+. . . .3. . . .+. . . .4. . . .+. . . .5. . . .+. . . .6. . . .+. . . .7. . . .+.
Forward this mail
Chris, F15
View Internet header F18
Save
Yes, to address
fax a spool in PB F20 call our API (FAXAFPDS) or simply place the spool file
file you can
inPrint this message
our FAXCOM output queue. F21 Either method will cause the system to automatically
Spell check message
convert the AFPDS spool file F23to a FAX image and send it.

Cursor
John :-)to a selection
and press the Enter key
or press F12 to Cancel
--------------------
>Can we fax AFPDS spool files using the KeyesFax system.

F1=Functions> Full-Roll Insert Bottom


F3=Exit F4=Adjust F6=Insert/OvrTyp F10=Top F11=Bottom F24=More Keys

82
4 Message Editor

To perform a function, you may press the appropriate function key, or move the
cursor down to the desired function and press the Enter key.
Only some of the available function keys were defined in the Select Function
window. The remaining functions, listed at the bottom of the screen are also
available. Many of them require that you position the cursor to a specific
location within the message text, before you press the desired function key. To
list the remaining functions, use F24 (More Keys).

83
4 Message Editor

Editing the Message Text


Type the text just as you wish to see it on the finished e-mail message. The
editor will automatically adjust the text as you type past the end of each line.
You can correct typing mistakes using the Backspace key. You may also use the
Delete key to remove text from a line.

To delete a line from the text:


1. Move the cursor to the line that you want to remove.
2. Press F13 (Delete). The program will delete the current line, and move all
the following lines of the message up one line.

To insert text in a paragraph:


1. Move the cursor to the position where you want to insert text.
2. Toggle the editor into Insert mode using F6 (Insert/OvrTyp). The program
will move all text down to the next line, starting at the current cursor
position. The current line will be filled with blanks to the right of the
cursor.
3. When you are finished inserting the new text, you can toggle the editor back
into OvrTyp mode using F6 or use F4 to adjust the paragraph leaving the
editor in Insert mode.

To adjust paragraph line endings:


If you have used the Delete key to remove text from a line. You may need to
adjust the paragraph line endings.
1. Move the cursor to the line where you want to adjust line endings.
2. Press F4 (Adjust). The program will adjust the current paragraph line
endings at word boundaries. The program will stop adjusting lines when it
finds a blank character in the left hand column of a text line.

Copying Lines of Text


You can copy lines of text from one place in your message to another, or copy
text lines to a different e-mail message.

To copy text to another line or another message:


1. Move the cursor to the first line to be copied and press F22 (Copy). The
selected line will be highlighted.
2. You may select additional lines to be copied by moving the cursor to each
additional line and pressing F22 (Copy). If you make a mistake, you may
press F12 (Cancel) and start the selection over again.
3. Move the cursor to the target location of the text in the current or another e-
mail message and press the Enter key.
The program will copy the selected text to the target location after moving any
existing text down.

84
4 Message Editor

Spell Checking
You may use F23 (Spell Check) to start the spell checker. It will check for
capitalization errors, duplicate words, and for spelling mistakes in your message
starting at the current cursor position. When an error is detected, the following
screen will pop up:

Spell Checker

This is a short mesage that I will use to see how the Message
------

mesage Spelling Error


Replace with Language: American
Suggestions
MASSAGE 1 1. Skip
MESSAGE 2. Skip All
MESSAUGE 3. Replace

5. Add to Main Dictionary


6. Add to User Dictionary
Bottom 7. Exit Spell Checker

Move cursor to a suggestion & press Enter to select it

The word that needs attention will be underlined on the screen and typed in the
Replace with field. Alternative spelling suggestions will be listed on the screen
for spelling errors.

Choosing a suggestion:
You may use the Roll keys to find a suggested spelling that you wish to choose.
Once located you may move the cursor down to the same line as the suggestion
and press the Enter key. The chosen word will be placed in the Replace with
field, capitalized appropriately, and the default action will be changed to
(Replace). To replace the word in the original text, you need only press the
Enter key again.
If you cannot find an appropriate suggestion, you may type another word in the
Replace with field and choose (Replace).
Note: Enhanced screens will use Radio buttons instead of the numbers (1-7) for
you to select an action. There are several ways to make a Radio button selection
after Tabbing to it:
● Use the arrow keys to move the highlight bar down to the desired action and
press the Space Bar.
● Type the access key (underlined letter) corresponding to the desired action.
● Double click on the desired action with a mouse.

85
4 Message Editor

Selecting an action:
For each incident you may Tab to the Action field and select an action to be
taken.
Skip Skip this word, leaving it as is.
Skip All Skip this word and all others with the same
spelling.
Replace Replace the word with the one that is typed
in the Replace with field.
Remove Remove the word from the text. This is only
available for duplicate word errors.
Add to Main Dictionary This will add the word to the main
dictionary that everyone uses.
Add to User Dictionary This is the recommended add option. It
will add the word to a user specific
dictionary.
Exit Spell Checker This will stop the Spell Checker.

Correcting capitalization errors:


The correctly capitalized word will be placed in the Replace with field for you.
You may correct the original text by choosing (Replace).

Correcting duplicate word errors:


The duplicated word will be placed in the Replace with field. You may change
the word and replace the original with the new word by choosing (Replace), or
you may choose (Remove) to have the word removed from the original message.

Changing your language:


You may change the language dictionary that the system uses for spell checking
this document by entering a new value in the Language: field and pressing the
Enter key. The available languages are:
American, British, Danish, French, German, Italian, and Spanish
The Default System Language field is set in the System Setup screen. Each user
can override the default value that they use by setting the Personal Language
field in the User Setup screen for their Mailbox.

86
4 Message Editor

Attachments (Inbound)
If any attachments were received with an inbound e-mail message, the first will
be shown to you on the Attach> line, of the Message Editor. If you move the
cursor to the Attach> line and press the Enter key, the following window will
pop onto your screen.

Attachments (Inbound)

Options: 1=Save attachment as 4=Remove 5=Display

Opt Filename Description Size Type RL


_ QCLSRC iSeries CL Source 1025 SrcPF 80
To: KMLIB WRKKML Translt: AtoE

_ FILE.ZIP Sample PC files 17054 PC/Binary


To: Translt: None

Bottom
F3=Exit F10=Top F11=Bottom F12=Cancel

You may display any attachment or save them to your iSeries or to a shared
folder.

Option 1=Save attachment as


Select option 1 to save an attachment from the e-mail message to your iSeries or
shared folder. The following window will pop onto your screen:

Save Attachment as

Filename Encode
QCLSRC BASE64
To: Folder, Library(Member) or Output Queue
KMLIB(WRKKML)
Type: 4 Rec Len: 80 Translate: 1 Replace: N

Types: 1=PC/Text 2=PC/Binary 3=PF (R/L)


4=SrcPF (R/L) 5=SplF 6=SavF
Translation: 0=None 1=AtoE 2=EtoA 3=UnEncrypt

Give destination and press Enter or F12=Cancel

Filename:
The system will set this to the original name of the e-mail attachment, however,
you can change the name to the desired destination.
Note: See Uncompression & Unencryption later in this chapter, for additional
information.

87
4 Message Editor

Encode:
This cannot be changed. It tells you how the attachment was encoded for
transport over the Internet. Most attachments are transported with either
QUOTED or BASE64 encoding. Text attachments can also be transported using
either 7BIT or 8BIT ASCII encoding, but this is rare.
QUOTED encoding is usually used for text attachments, whereas, BASE64 is
normally used for binary attachments.

Description:
The system will set this to the original description from the e-mail attachment,
however, you may change the description, as desired.

To:
You must set this field to where you wish to save the attachment.
• For PC type documents, enter a shared folder path.
• For iSeries source or physical files, enter a library name followed by a
member name in parenthesis.
• For iSeries spool files, enter the name of an output queue.
• For iSeries save files, enter a library name.

Type:
Set the type according to where you will be saving the attachment.
• If it will be saved on a shared folder, set this to 1 or 2 depending on
whether it was a text or a binary file.
• If it will be saved as an iSeries physical file, set this to 3.
• If it will be saved as an iSeries source file, set this to 4.
• If the attachment was an iSeries spool file saved using IBM's GETSPLF
command, set this to 5.
• If the attachment was an iSeries save file, set this to 6.

Rec Len:
Set this field to the file's record length for iSeries physical files or iSeries source
files only. If the destination file already exists, it must have a matching record
length. For new files, this will be the record length of the file that is created.
Note: For iSeries source files, set this field to the length of the data plus 12
additional bytes that is used for the date and sequence numbering in the source
file.

88
4 Message Editor

Translate:
This field can be used to have the attachment data translated while it is being
saved.
• 0 = No translation
• 1 = Translate from ASCII to EBCDIC
• 2 = Translate from EBCDIC to ASCII
• 3 = UnEncrypt by supplying the password

Note: See Uncompression & Unencryption later in this chapter, for additional
information.

Replace:
Code a Y in this field if you wish to replace an existing PC file, iSeries Physical
file member, source member, or (or member) on the iSeries with the same name.

Option 4=Remove
Select option 4 to remove an attachment from the e-mail message. You may
want to remove an inbound attachment before forwarding or copying the
message to someone else.

Option 5=Display
You may display an attachment on your iSeries screen, by selecting option 5.
The following window will pop onto your screen:

Display an Attachment

Filename: SAMPLE.DOC
Encoded: QUOTED
Description: Word document

Translate: 1 0=None 1=AtoE

Enter translation and press Enter or F12=Cancel

The program will optionally translate and temporarily save the attachment as a
78 character wide physical file in your QTEMP library. This is then displayed
on your screen.
Notes: This will be most useful for displaying text based iSeries or PC type
documents, such as physical files or word processing files.
It can also be used to view an archive (ZIP) file, to see the names of the objects
that are included. You may need to know their exact names to be able to
uncompress or unencrypt them.

89
4 Message Editor

Uncompression & Unencryption


If the filename that you supply, when saving an attachment, has a .ZIP extension,
this signifies that the file has been compressed and may have been encrypted. If
you have purchased PKZIP and it is available on your library list, KeyesMail
will attempt to uncompress the archive for certain types of attachments.
PC Text and PC Binary files are not uncompressed. They are saved as-is with
the Filename that you supply and in the Folder that you designate. You should
be able to use any available PC tool to uncompress and unencrypt these types of
files.
iSeries Physical Files and Source Files can be uncompressed by KeyesMail.
You must code the Filename parameter with the exact name of the file that was
originally archived, then add a .ZIP extension. Code the library and member
names, as usual, in the To: field. KeyesMail will strip off the .ZIP extension,
and use the remaining value for the name of the file that it will try to extract from
the archive. The name must match the file that was originally saved into the
archive file.
Spooled Files that were saved as-is with no translation can be uncompressed.
You must code the Filename parameter with the original spooled file name that
was archived, then add a .ZIP extension. Code the output queue name in the To:
field.
Save Files can also be uncompressed, in the same way. You code the Filename
parameter with the original name of the Save File followed by the .ZIP
extension. KeyesMail will uncompress the Save File into the library that you
specify in the To: field.
Notes: If you need to name the extracted file something other than its original
name, you will have to save the file, without the .ZIP extension. You can then
manually use the PKUNZIP program to extract what you need with the names
you desire.
You can use the Display feature (option 5) to view an archive. This will allow
you to see the names of the original objects that were saved in the archive file.
If the file was originally password encrypted, in the archive, you will have to
code a 3 (Unencrypt) in the Translation field. KeyesMail will pop up a screen to
allow you to specify the case sensitive password, that will be required to extract
the file.

90
4 Message Editor

Attachments (Outbound)
You can define up to 99 different attachments with each outbound e-mail
message. While using the Message Editor, if you move the cursor to the Attach>
line and press the Enter key, the following window will pop onto your screen.

Attachments (Outbound)

Options: 1=Save attachment as 2=Change 4=Remove 5=Display

Opt Filename Description Size Type RL


_ QCLSRC iSeries CL Source 1025 SrcPF 80
Fr: KMLIB WRKKML Translt: EtoA

_ FILE.ZIP Sample PC files 17054 PC/Binary


Fr: QIWSTOOL\SAMPLES Translt: None

_ SAVFILE Saved iSeries objects 21120 SavF


Fr: KMLIB Translt: None

More...
F3=Exit F6=New F10=Top F11=Bottom F12=Cancel

Note: Large attachments may take from 1 to 5 minutes per megabyte to be


encoded for transmission and from 10 to 15 minutes per megabyte to transmit
over a dial-up line.

Option 1=Save attachment as


This option will work the same as described previously for inbound attachments.

Option 2=Change
Use this option to change a definition of an attachment. When you change an
attachment, the data will be retrieved and encoded for transport again.

Option 4=Remove
Select option 4 to remove an attachment from the e-mail message.

Option 5=Display
This option will work the same as described previously for inbound attachments.

91
4 Message Editor

Defining new Attachments


While on the Attachments (Outbound) screen, you can use F6 (New) to define
new attachments for an e-mail message. The following window will pop onto
your screen.

Get Attachment from

Type: _ 1=PC/Text 2=PC/Binary 3=PF


4=SrcPF 5=SplF 6=SavF

Enter Type or F12=Cancel

You must select a type for the attachment before you can define it.
1 PC text file located in the IFS or a shared folder.
2 PC binary file located in the IFS or a shared folder.
3 iSeries physical file member.
4 iSeries source file member
5 iSeries spool file
6 iSeries save file
After selecting a type, the Get Attachment from screen will be expanded to
include additional fields.

Type 1 (PC/Text) or Type 2 (PC/Binary)


You may use the <Filename> hot spot to open a browse screen to assist you in
selecting the file and its folder for the attachment. Most PC files should be sent
with no translation. However, you can translate a text file to EBCDIC, if
needed. See Compression & Encryption later in this chapter, for additional
information.

Get Attachment from

Type: 2 1=PC/Text 2=PC/Binary 3=PF


4=SrcPF 5=SplF 6=SavF

<Filename> Description

Folder

Translate: _ 0=None 1=AtoE


Compress: _ 0=None 1=Fast 2=Normal 3=Max
Encrypt: _ 0=None 1=ZipStd 2=ZipAdv

Enter From information or F12=Cancel

92
4 Message Editor

Type 3 (PF) or Type 4 (SrcPF)

Get Attachment from

Type: 4 1=PC/Text 2=PC/Binary 3=PF


4=SrcPF 5=SplF 6=SavF

<Filename> Description

Library Member

Translate: _ 0=None 1=AtoE 2=EtoA 3=CSV


Compress: _ 0=None 1=Fast 2=Normal 3=Max
Encrypt: _ 0=None 1=ZipStd 2=ZipAdv

Enter From information or F12=Cancel

You may use the <Filename> hot spot to open a browse screen to assist you in
selecting the iSeries physical file or source file, library, and member for the
attachment.
If the file is being sent to another iSeries, you will typically send it with no
translation. If the file is being sent to an ASCII machine, you can translate the
file to ASCII using a translation code of 2 (EtoA) or 3 (CSV / Comma Separated
Values). CSV is the best way to translate data that will be imported into spread
sheets, such as Excel.
See Compression & Encryption later in this chapter, for additional information.

Type 5 (SplF)

Get Attachment from

Type: 5 1=PC/Text 2=PC/Binary 3=PF


4=SrcPF 5=SplF 6=SavF

<Spool File> Description

Job Name User Number Spl# Pages


1 *END
Translate: _ 0=None 2=TXT 3=IMG 4=RFT 5=MAP 6=PDF
Compress: _ 0=None 1=Fast 2=Normal 3=Max
Encrypt: _ 0=None 1=ZipStd 2=ZipAdv 3=PDF

Enter From information or F12=Cancel

You may use the <Spool File> hot spot to open a browse screen to assist you in
selecting the iSeries spooled file and all its parameters for the attachment. You
may select specific pages, but only if you specify a translation code other than 0
(None).

93
4 Message Editor

The entire spooled file can be sent as a spooled file to another iSeries, if you
specify no translation. The other iSeries can restore the spooled file to one of its
own output queues. If the recipient does not have KeyesMail software, they can
follow the instructions that you can find in the Appendix section to restore the
spooled file.
Selected pages of the spooled file can be sent if you translate it.
You can translate AFPDS or *USERASCII spooled files into TIFF Images
(translation 3). These can be viewed and printed by PC users, as well. All
windows based PC's have TIFF viewers available to them, for example the Wang
viewer or the Kodak viewer.
Rich Text Format (translation 4) is a convenient format for sending *SCS
spooled files to a PC user. Most PC's will have an RTF reader (MS Word, Lotus
WordPro, & WordPerfect are examples) that can easily view and print the
document by simply clicking on the received attachment. The RTF file will
contain all the page and font formatting necessary to print each spooled page
properly, without any user intervention. KeyesMail will use the Page Width and
Page Length spooled file attributes to determine the proper font sizes.
You can map (translation 5) spooled data onto an overlay to fill out a form
before mailing it. The overlay must be an RTF image that you create
specifically for the form with substitutable fields where the spooled data will be
mapped. The spooled file is then mapped onto the form using mapping entries.
Detailed information about Mapping a Spooled File to an Overlay can be found
in the Appendix section of this manual.
Portable Document Format (translation 6) is a popular way of sending any type
of spooled file. Adobe's Acrobat reader is available to most personal computers
for free on the Web. KeyesMail will use the Page Width and Page Length
spooled file attributes to determine the proper font sizes.
See Compression & Encryption later in this chapter, for additional information.

94
4 Message Editor

Type 6 (SavF)

Get Attachment from

Type: 6 1=PC/Text 2=PC/Binary 3=PF


4=SrcPF 5=SplF 6=SavF

<Save File> Description

Library

Translate: 0 0=None
Compress: _ 0=None 1=Fast 2=Normal 3=Max
Encrypt: _ 0=None 1=ZipStd 2=ZipAdv

Enter From information or F12=Cancel

You may use the <Save File> hot spot to open a browse screen to assist you in
selecting the iSeries save file and its library for the attachment. The translation
code must be 0 (None).
The save file can only be used on another iSeries. If the recipient does not have
KeyesMail software, they can follow the instructions that you can find in the
Appendix section to restore the save file.
See Compression & Encryption later in this chapter, for additional information.

95
4 Message Editor

Compression & Encryption


Zip Compression & Encryption:
If you own PKZIP and it is included on your library list, you can compress and
optionally password encrypt the attachments that you send.
Select the compression method of Fast, Normal, or Max if you want the
attachment compressed. The compression method will determine the amount
and speed of compression that you desire.
● Fast will be fast and also provide fairly good compression amounts.
● Normal provides good compression amount at a reasonable speed.
● Max provides the maximum compression, but will also take the longest in
time to process.
The filename that you supply, when creating an attachment, will have an
extension of .ZIP added to it. This signifies that the file has been compressed,
and allows you to optionally password encrypt the file.
If you want to protect the compressed data, with the use of encryption, you can
specify the encryption method of ZipStd or ZipAdv. This value specifies which
algorithm is to be employed.
● ZipStd is the original algorithm used in PKZIP 2.x products and is
compatible with other ZIP products that support standard encryption, such as
GZIP.
● ZipAdv is a PKZIP exclusive implementation of the AES 128-bit key
algorithm to produce a Strong Encryption protected document.
If you call for encryption, a password window will pop onto the screen. It will
allow you to specify up to 64 characters of case-sensitive password. Please note
that there is no way to extract the password used in an archive. If the password
is forgotten, the file will become inaccessible.

PDF Encryption:
If you are translating a spooled file into a PDF document, you can optionally
encrypt the PDF. Do this by specifying a 3 in the Encrypt parameter. A window
will pop onto the screen, asking for a User Password and/or an Owner
Password.
A user will be able to open a PDF document and optionally print and annotate
the PDF. The user will not be allowed to change the PDF. An owner will be
able to do anything to an encrypted PDF document.

96
5 PhoneBook

5 PhoneBook

The KeyesMail Phonebook is maintained by a powerful information manager


called KeyesFile. KeyesFile is like a set of index cards that automatically sorts
itself. You can use it to keep track of a wide variety of information, such as:
names, addresses, phone numbers, sales information, customer follow-up, or
anything else that you need to have quick access to.
The true power of KeyesFile is its instant accessibility of the data using any
piece of information that you have entered on the cards. For example, assume
you recorded information about your customers with company name, address,
contact, phone number, and e-mail address keyed on the cards. You could
access the cards by company name one moment, then by contact, phone number,
or e-mail address the next, or by any other information that you have placed on
any of the available 999 lines of the cards.

Starting and Stopping the Phonebook


You may start the KeyesFile Information Manager program using either of two
methods. It can be started from the KeyesMail menu or from a command line.

To start the KeyesFile Information Manager:


● Select item 2 (PhoneBook) from the KeyesMail menu.
OR
● Type the following command to start the Phonebook.
Enter: PB
Note: The program will look in your user setup to see if you have a personal
Phonebook defined and open that KeyesFile card file. If not, the default system
Phonebook will be opened.

To stop the KeyesFile Information Manager:


● Press F3 (Exit).
KeyesFile will end and the display will return to the previous program or
menu.

97
5 PhoneBook

KeyesFile's Screen
The KeyesFile Information Manager uses a card file layout to enter and display
all of your data. From 1 to 999 lines of data may be keyed on each card. Each
line may contain up to 45 characters.
Information may be keyed anywhere on the cards. You may use a 10 character
Card Heading area to help you key like information in the same lines of each
card.
9 card tops are shown to you at all times. The card tops show you the index or
key to the card file.
A Member Status area is used to show you the document member that is opened,
and the total number of cards in the member. A Card Status area shows you the
date, the time, and the last user-id of the person who changed each card in the
member.

Note: Many of KeyesFile's function keys are position sensitive. They will
perform a different function depending on where the cursor is located.

98
5 PhoneBook

Getting Help
KeyesFile contains a number of Help screens to assist you in using the program.
The Help key is position sensitive. The location of the cursor when you press
the Help key determines what information is initially displayed. Using the Roll
keys, you can then move through as much of the Help text as you need.

To display Help screens:


1. Move the cursor to the field or area that you want to display Help
information for.
2. Press the Help key. KeyesFile will display a Help screen specific to that
area.
3. Use the Roll keys to move through the Help text.
4. When you have finished viewing the Help text, press F3 (Exit Help) to
return to KeyesFile.

99
5 PhoneBook

Adding and Filling In Cards


Line #1 of each card is considered the primary key to KeyesFile. You should
choose an important piece of information to enter in the first line. The primary
key will always be shown to you to help you identify the specific cards that are
being displayed. KeyesFile uses the text that you enter into each line to select
and sort the cards.
You may select any line on the card to be the key. When you select a line,
KeyesFile will only display cards that have something entered for that line.
When you select the primary key, all cards will be displayed, even cards with the
first line left blank.

To add a new card:


1. Move the cursor to the Index line (top of the first card).
2. Press F6 (Add/Insert/Create).
KeyesFile will add a new blank card to the card file.

To fill in a blank card:


1. Move the cursor to the Card Body.
2. Type the text for the card.

Adding Lines to a Card


Additional lines on the card can be made available using the Roll keys (when the
cursor is in the Card Body).
OR
Press F11 (Last) when the cursor is in the Card Body to move the cursor to the
next available line to be entered for a card.

100
5 PhoneBook

Moving Through Your Cards


You can scroll through a card file card by card or bring a specific card directly to
the front. KeyesFile always shows you the cards in alphabetical order based on
the selected key.

To change the selected key:


1. Move the cursor to the colon : in the Key Indicator column of the line that
you wish to select as the key.
2. Press the Enter key.
The symbol > will be placed in the Key Indicator column where the cursor
was located.
KeyesFile will show you the cards in a new order based on the newly
selected key. The Card Tops will be split showing you both the newly
selected key and the primary key for each card selected.
Only those cards that have some information entered into the selected line
will be shown, except when the primary key is selected.

Scrolling through Your Cards


The functions below, except for F7 (Prev Card) and F8 (Next Card), require that
the cursor be located in the Index line or somewhere on the other Card Tops.
Press this: To do this:
Roll Up Scroll to the next 9 cards.
Roll Down Scroll to the previous 9 cards.
F7 Scroll to the previous card.
F8 Scroll to the next card.
F10 Bring the first card to the front.
F11 Bring the last card to the front.

To bring a specific card to the front:


1. Move the cursor to the Index line at the top of the card.
2. Type a portion of the index line text for the card you want to bring to the
front.
You may type just enough text to distinguish the card from the other cards.
3. Press the Field Exit key.
Note: If you would like to display one of the 9 cards that are visible, move the
cursor to that card's top and press the Enter key.

101
5 PhoneBook

To bring a specific card number or line number to the front:


1. Move the cursor to the Card Number/Line Number area, and press the Enter
key.
KeyesFile will highlight the card number and line number to show that they
are activated.
2. Type the new number and press the Enter key.
KeyesFile will jump directly to the specified card and/or line number. If the
card number does not exist, KeyesFile will ask you to confirm the creation
of a new card.

Displaying a Subsetted List of Cards


You can display a subset of a list of cards by supplying a generic name followed
by an asterisk * in the Index line. Only cards that match the generic name will
be selected for display.
For example, if you type the three characters 07* on the Index line, this would
define the subsetted list of all cards that have the two characters 07 in the first
two columns of the selected key. If the selected key line was a date field, then
only cards that have a July date would be displayed.

To display a subsetted list:


1. Move the cursor to the Index line at the top of the card.
2. Type the generic portion of the index line text that will define a subsetted
list followed by an asterisk *.
3. Press the Field Exit key.
An asterisk * will be displayed in the Key Indicator column instead of the
usual > character to inform you that a subsetted list of cards is being
displayed.

Cancelling a Subsetted List


If you create a subset of a list of cards, and then decide you no longer want to
work with this subset, you can return to the full list in one of two different ways.

To cancel a subsetted list:


● Return to the Index line and key starting text without an asterisk.
OR
● Change the selected key to the same or a different key, by moving the cursor
to the desired Key Indicator column and pressing the Enter key.
KeyesFile will change the * back to a > character in the Key Indicator column.

102
5 PhoneBook

Searching for Text in Cards


You can find specific text in the cards by using the Search command. You can
start a search at any point in the card file. KeyesFile will search forward from
the current card and, when it reaches the last card, automatically continues
searching from the beginning of the card file.
When searching for text, KeyesFile ignores capitalization. KeyesFile will search
cards according to the selected key in the order that is shown to you. If you are
displaying a subsetted list of cards, only those cards will be searched. If you
wish to search all cards, select the primary key before starting the Search
command.

To search for text:


1. Bring to the front of the card file the card that you want to begin the search.
2. Press F14 (Search).
3. Type the text that you want to find in the specific line that you wish to
search, or in the Index line to search all lines in the cards.
Note: KeyesFile will work much faster when searching for text in a specific line,
rather than searching all lines in the cards.
4. Press the Enter key.
KeyesFile searches for the text and selects the first occurrence. If there are
no occurrences of the text in the cards that are selected for display,
KeyesFile will display a message telling you that the text was not found.
5. To find the next occurrence of the same text, press F16 (Find Next).

103
5 PhoneBook

Editing Text on Cards


You can make changes or add text to existing cards by selecting the card that
you want to change, moving the cursor to the desired location, and adding or
typing over any existing text.
If you change the text in the selected key, KeyesFile automatically places the
card in its correct alphabetical order when you press the Enter key.

Scrolling Through a Card


There are up to 999 lines that can be entered on each card. The functions below
require that the cursor be located within the Card Body.
Press this: To do this:
Roll Up Scroll to the next 9 lines.
Roll Down Scroll to the previous 9 lines.
F10 Bring the cursor to the first line.
F11 Bring the cursor to the next available line at the bottom of the
card.

Inserting a Line in a Card


If you want to move existing lines of text down in a card, you can make room for
additional text to be inserted.

To insert a line in a card:


1. Move the cursor to the line that you want to move down.
2. Press F6 (Add/Insert/Create).
KeyesFile will move all lines of the card down to the next line, starting at
the cursor location. The current line will be filled with blanks.

Deleting a Line from a Card


For safety reasons, KeyesFile will not allow a line to be deleted unless the text
from that line has been cleared. You can clear a line by placing the cursor in the
first position and pressing the Field Exit key.

To delete a line from a card:


1. Clear the text from the line that you want to remove.
2. Move the cursor to the line.
3. Press F13 (Delete).
KeyesFile will delete the current line, and move all the following lines up
one line.

104
5 PhoneBook

Copying Text to Another Line or Card


You can copy one or more lines of text into a blank area of any card. The text
can be gathered from one or more cards, in any order. The resulting copy will be
output in the order that the text was gathered.
If you wish to move text to a different position on a card, use the copy function,
then clear the original text.

To copy text:
1. Free up enough lines in the target card to hold the text to be copied. You
may want to use F6 (Insert) to make room for the copy.
2. Move the cursor to the first line to be copied and press F22 (Copy).
KeyesFile will highlight the selected line.
3. You may select additional lines to be copied by moving the cursor to each
additional line and pressing F22 (Copy). If you make a mistake, you may
press F12 (Cancel) and start the selection over again.
4. Bring the target card to the front of the file.
5. Place the cursor at the beginning of the blank area in the target card and
press the Enter key.
KeyesFile will copy the text to the new location only if there is sufficient
room to make the copy without overlapping any other text on the following
lines.

Undoing Changes
You can use the Home key (Alt+Home on some terminals) to undo changes that
were just made to a card.
You must press the Home key twice to activate Undo. The first time you press
the Home key, the cursor will be moved to the home position. The second time
you press the Home key, it will undo all changes that were made since the last
time you pressed any function key, a Roll key, or the Enter key.

105
5 PhoneBook

Using Card Headings


Card headings may be entered on the left side of the card. One set of headings
will be used for all cards in each file. The headings will make it easier for you to
enter like information in the same line of every card.

To enter card headings:


1. Move the cursor to the Card Headings, and press the Enter key.
The Card Headings area will be highlighted to show that it is activated.
2. Type the text for the headings.
Additional lines for the headings can be made available using the Roll keys.
OR
Press F11 (Last) to move the cursor to the next available line to be entered
for a card heading.
3. When you have finished working with the card headings, press the Enter
key.
The cursor will return to the Index Line.

Editing Card Headings


When working with Card Headings, the insert, delete, and copy functions will
affect a line for all cards in the card file. Before performing one of these
functions KeyesFile will ask you to confirm it.
Press this: To do this:
Roll Up Scroll to the next 9 heading lines.
Roll Down Scroll to the previous 9 heading lines.
F6 Insert a new line at the current cursor position for all cards in
the card file.
F10 Bring the cursor to the first line.
F11 Bring the cursor to the next available line of headings at the
bottom of the card headings.
F13 Delete the current line from all cards in the card file.
F22 Select the current line for all cards in the card file to be copied.

106
5 PhoneBook

Deleting a Card
You can delete a card from a card file with the following procedure.

To delete a card:
1. Bring to the front of the card file the card you want to delete.
2. Move the cursor to the Index line at the top of the card.
3. Press F13 (Delete).
You will be asked to confirm the deletion.
4. Press the Enter key.

107
5 PhoneBook

Duplicating a Card
If the information to be keyed in a card is similar to another existing card, you
might want to copy the entire card then edit the copy as necessary.

To duplicate a card:
1. Move the cursor to the Index line or to the Card Top of the card that you
wish to duplicate.
2. Press F22 (Copy).
KeyesFile adds an exact copy of the card to the card file. The original card
will become the current card. You may press F8 (Next Card) to move to the
copy.

108
5 PhoneBook

Working with E-mail Addresses


If you have entered e-mail addresses on the cards, you can easily create, address
and send messages to those addresses using F2 (Fax/E-mail).

Placing an E-mail Address on a Card


E-mail addresses may be keyed anywhere on the cards, using the following
format.

name@host.network
E-mail addresses are recognized by the '@' character that must be keyed
as part of the address.

Using F2 (Fax/E-mail)
The F2 key can be used for two different purposes. If you have our KeyesFax
system, it can be used to create and send an image, Message member, text, or
OV document as a fax. If the cursor is positioned on an e-mail address, it will
pass the company name, contact, and e-mail address from the card to the Work
with KeyesMail program.
From the Work with KeyesMail screen, you can create a new message (using F6)
or copy any existing mail member (using option 3) to be sent to the selected
recipient.
The information that is used to address the new mail member is defined in the
user's setup screen under their personal Phonebook. If the user does not have a
personal Phonebook defined, the system Phonebook definition is used.

To send an e-mail message:


When you press F2 on an e-mail address, the system will search for the card
heading that matches the company name and contact definition. The appropriate
card heading is defined in the user or system setup for the Phonebook.
1. Place the cursor anywhere on an e-mail address.
johnsmith@somecompany.org
2. Press F2 (Fax/E-mail).
KeyesFile will save the company name, contact, and address in a data
queue and call the Work with KeyesMail program.
3. You will be given the chance to either create a new mail message using F6,
or copy an existing mail member using option 3. The new or copied mail
will be addressed appropriately and opened for you to edit the message.
4. After you have finished editing and sending the new message, you may end
the Work with KeyesMail program using F3 (Exit). You will be returned
back to the Phonebook where you left off.

109
5 PhoneBook

Printing Lines from Cards


You can print an image of an entire card, or you can select specific lines from
the cards to be printed on the default printer. After selecting lines to be printed,
you can print individual cards or a series of cards by selecting the first and last
card in the series to print.

Printing a Card Image


When printing a card image, KeyesFile will include card headings and lines
around the text.

To print an image of a card:


1. Move the cursor to the Index line, or Card Top of the card that you want to
print.
2. Press F21 (Print).
KeyesFile will print an image of the card, which will include all lines down
to the last line that contains headings or text for the selected card.

Selecting Lines to be Printed


To print selected lines you must first select the lines to be printed then either
print those lines for individual cards or for a series of cards.

To select lines to be printed:


1. Move the cursor to the first line on a card to be printed.
2. Press F21 (Print).
The selected line will be highlighted.
3. You may select additional lines to be printed by moving the cursor to each
line and pressing F21 (Print).
Note: You may print blank lines, for proper spacing, by selecting lines with no
data on them. If you make a mistake, you may press F12 (Cancel) and start the
selection over again.

110
5 PhoneBook

Printing Individual Cards


After selecting lines to be printed, you may select the individual cards that you
want to print.

To print one or more individual cards:


1. Bring the card that you want to print to the front.
2. Move the cursor to the Card Body and press the Enter key.
KeyesFile will print the previously selected lines in the order that the lines
were selected, then ask if you would like to print the same lines for
additional cards.
3. To select additional cards to be printed, repeat steps 1 and 2 above.
4. When you are finished selecting cards to be printed, press F12 (Cancel).

Printing a Series of Cards


After selecting lines to be printed, you may select a series of cards that you want
to print.
When printing a series of cards, KeyesFile uses the selected key to determine the
order and total number of cards to be printed.

To print a series of cards:


1. Move the cursor to the Index line, or the Card Top of the first card that you
want in the series to be printed.
2. Press the Enter key.
KeyesFile will ask you to select the last card in the series to be printed.
Note: You may use any method to scroll through the cards to find the last card in
the series. However, you should not change the selected key between the
selection of the first card and the last card.
3. Move the cursor to the Index line, or the Card Top of the last card that you
want in the series to be printed.
4. Press the Enter key.
KeyesFile will print the previously selected lines for all of the cards from
the first card selected to the last, in the order that the lines were selected.
When it is finished KeyesFile will ask if you would like to print the same
lines for additional cards.
5. To select additional series of cards to be printed, repeat steps 1 through 4
above.
6. When you are finished selecting cards to be printed, press F12 (Cancel).

111
5 PhoneBook

Managing KeyesFile Members


KeyesFile uses a database file called KEYFILE and a logical file called
KEYFILEA. Your individual KeyesFile document members will be members of
those files.

Opening a KeyesFile Member


You can open a new member or change to a different member at any time.

To open a KeyesFile member:


1. Move the cursor to the Member Name area, and press the Enter key.
The Member Name area will be highlighted to show that it is activated.
2. Type the name of the new or existing member name that you want to open.
3. If the member is private or locked, and you are not the owner, then you
must also provide the appropriate password.
For a locked member, if you do not provide a password, you will still be
allowed to open the member and work with any of the lines that are not
locked.
4. Press the Enter key.
KeyesFile will open the member named if it already exists. You will be
asked to confirm the creation of a new member if it does not exist.

Determining Document Member Names and


Sizes
The number of cards that have been created in each member is displayed in the
Member Status area, but this does not tell you how many lines you have created
for the cards. You can determine the names of all the KeyesFile document
members and their total sizes using F4 (Prompt).

To determine member names and sizes:


1. Move the cursor to the Member Name area.
2. Press F4 (Prompt), with the cursor on the member name.
KeyesFile will display a complete file description of the data base file called
KEYFILE.
3. Use the Roll keys to scroll through the member names and sizes.
4. When you are finished you can return to KeyesFile by pressing the Enter
key or F3 (Exit).

112
5 PhoneBook

Copying and Merging Members


You can copy a KeyesFile member to another member name. If the other
member already exists, you can merge or consolidate two sets of cards. Before
you can copy or merge a member you must open it.

To copy or merge a KeyesFile member:


1. Open the KeyesFile member that you want to make a copy of.
2. Move the cursor back to the Member Name area and press the Enter key.
The Member Name area will be highlighted to show that it is activated.
3. Leave the cursor in the Member Name area and press F22 (Copy).
KeyesFile will ask you to type a new name to be copied into.
4. Key a new member name to be created or merged into.
5. Press the Enter key.
KeyesFile will copy the original member that was open to the new name
supplied. If the new name already exists, you will be asked to confirm that
you want to merge the two members together. If the existing member is
private or locked, you must be the owner to copy into it.

Deleting a KeyesFile Member


To delete an entire KeyesFile member, you must open it first, and you must have
delete capability in the KeyesFax library.

To delete a KeyesFile member:


1. Open the KeyesFile member that you want to delete.
Only the owner of a private or locked member can delete it.
2. Move the cursor back to the Member Name area and press the Enter key.
The Member Name area will be highlighted to show that it is activated.
3. Leave the cursor in the Member Name area and press F13 (Delete).
KeyesFile will ask you to confirm the deletion of the member.
4. Press the Enter key.
Be sure that you have the correct member before you delete it. You can only
replace a deleted member with a backup copy of the file KEYFILE.

113
5 PhoneBook

Securing a KeyesFile Member


You may designate each KeyesFile member as either *PUBLIC, *PRIVATE, or
*LOCKnnn. A public member can be used by any person that has access to the
KeyesFax library, based on their iSeries security profile. Private and locked
members are owned by a single person, but can be used by anyone who knows
the proper password. Passwords are set by the owner.
A locked member can be used by any person that has access to the KeyesFax
library, but only those who know the password can add, change, or delete any of
the locked lines in the cards. nnn specifies the last line number that is locked.
By specifying *LOCK999 you can allow a member to be used for inquiry only.
Smaller locks will allow some information to be added or changed for the cards.

To change the member security:


1. Open the KeyesFile member that you want to change.
If the member is public, anyone can change the security. Otherwise, only
the owner can change the security.
2. Move the cursor back to the Member Name area and press the Enter key.
The Member Name area will be highlighted to show that it is activated.
3. Type either *PUBLIC, *PRIVATE, or *LOCKnnn in the secured line.
nnn is the last line number to lock. For example, *LOCK010 will lock
the first 10 lines of each card in the card file.
4. If you selected *PRIVATE or *LOCKnnn, you must also type a password
in its line.
5. Press the Enter key.

To change the password:


1. Open the KeyesFile member that you want to change the password.
Only the owner of a member can change the password.
2. Move the cursor to the Password area and press the Enter key.
The Password area will be highlighted to show that it is activated.
3. Type the new password and press the Enter key.

114
5 PhoneBook

Importing and Exporting Data


The KeyesFile Information Manager uses a database file where each record
contains a single line of card data. This file format is very efficient for storage
and retrieval purposes, but is extremely difficult to work with for your
applications. We have included import and export programs to make the sharing
of this data much easier for you.
Each line of data for the card file is 45 characters long. The import and export
programs use a file that combines one or more lines from the card file into a
single record for you to use. The first 45 characters of the import/export file is a
reserved area. Characters 46 to the end of the file contain the data that is from or
going to the card file.
You can choose the number of card lines that will be imported or exported. You
can choose 1, 10, 20, 50, or 100 card lines. If you choose 1 line, the
import/export file is built at 90 characters wide, with the 1 card line mapping to
columns 46 through 90 of the file. If you choose 10 lines, the file is built at 495
characters wide, with the 10 card lines mapping to columns 46 through 495. 20
lines will build a 945 character file, 50 lines uses a 2295 character file, and 100
lines uses a 4545 character file.

Importing Data to KeyesFile


You can import data to a KeyesFile member from an existing database file so
that you do not have to rekey the information. First you must decide how many
card lines you will be importing (1, 10, 20, 50, or 100). You will then built an
import file of the appropriate width that contains the data that you wish to be
placed in the card file. Each of the records in the import file will contain all of
the lines for one card in the KeyesFile member. You may then run the
KFIMPORT command either from the KeyesFile menu or the command line.
You can import data to an existing KeyesFile member.

From database file:


This is the name of the import file that you have built. Each record will contain
up to 1, 10, 20, 50, or 100 card lines.

Library:
This defaults to *LIBL and specifies the library that the database file can be
found in.

To KeyesFile member:
This names the KeyesFile member that you will be importing the data into.
Records will be added to the member.

Number of lines per card:


This defaults to 100. You can specify 1, 10, 20, 50, or 100 lines depending on
how you built the import file.

115
5 PhoneBook

Exporting Data from KeyesFile


You can export data from a KeyesFile member to database file so that you can
sort, select, process, or print the data with your own application programs. First
you must decide how many card lines you will be exporting (1, 10, 20, 50, or
100). You may then run the KFEXPORT command either from the KeyesFile
menu or the command line. It will build the appropriate size file and export data
to it. Each of the records in the export file will contain all of the included lines
for one card in the KeyesFile member.

From KeyesFile member:


This names the KeyesFile member that you will be exporting the data out of.

To database file:
This is the name of the export file that will be built. Each record will contain up
to 1, 10, 20, 50, or 100 card lines.

Library:
This defaults to *CURLIB and specifies what library the database file should be
built in.

Number of lines per card:


This defaults to 100. You can specify 1, 10, 20, 50, or 100 lines depending on
how you want the export file built.

116
5 PhoneBook

Using KeyesFile as a Phonebook


Any KeyesFile member can be used as a Phonebook to save and supply
information for the KeyesMail Editor.
While using the KeyesMail Editor, you can press F20 (Phonebook) to access
your Phonebook. The default member that you will be placed in is either defined
as your personal Phonebook, or the system Phonebook will be used. You can
switch to a different KeyesFile member by moving the cursor up to the member
name field, activating it by pressing Enter, and changing the name.

Using F20 (Phonebook) on Inbound Mail


When you have opened an inbound mail member with the KeyesMail Editor, you
may press F20 (Phonebook) to save the name and address of the sender to your
Phonebook.
The From address is passed to your Phonebook in a data queue. After opening
the Phonebook, you can use any of the standard search features to see if a card
already exists for the address in question.
If a card already exists, you may include the new address (shown to you on the
screen) on the existing card. If no card exists for that address, you may add a
new card by placing the cursor on a card top and pressing F6 (Add/Ins/Create).
A new card will be created and the name and address automatically entered on it.
After making any desired changes to the card, press F3 (Exit), and you will be
returned to the KeyesMail Editor where you left off.

Using F20 (Phonebook) on Outbound Mail


When you are displaying the Recipient Addresses screen of the KeyesMail
Editor, you may press F20 (Phonebook) to assist you in addressing the mail.
Your Phonebook is opened allowing you to select one or more entries (up to
100) to receive the e-mail message.
To select individual cards, move the cursor to the body of each card and press
F20 (Select). To select a series of cards, position the cursor on a card top of the
first card in the series and press F20. You may then roll through the cards to
position the cursor on the card top of the last card in the series and press Enter.
After all the recipients have been selected, press F3 (Exit) and you will be
returned to the KeyesMail Editor. All of the selected recipients will be used to
address your e-mail message.
Your user setup screen contains the default Phonebook name that you can set to
any of the available KeyesFile member names. It also contains heading search
values that the program will use for the selection. The default heading search
values are "Contact" , "Company", and "E-mail". The program will look for
these headings in your KeyesFile member and retrieve the information in the
corresponding lines for the cards that you select.

117
5 PhoneBook

- - - - blank page - - - -

118
6 API's

6 API's

Application Program Interfaces (API's)


KeyesMail contains a number of API's that can be used to customize or automate
a system for specific tasks. The API's are used to create and send e-mail
messages automatically to recipients on the Internet.
Chapter 7 (Output Queue) of this manual describes an easy method of
automatically e-mailing Spooled Files. But, sometimes an API can be more
flexible.
API's can be used to prepare mail with input from a user. They can be used to
prepare and send e-mail with multiple attachments. They can be used to send
automatic responses to e-mail queries from users on the Internet. To do this you
would monitor for mail being received in a particular mailbox. The subject or
the received message can be scanned for keywords which would trigger one or
more of the API's being called in response.
This kind of automation speeds delivery, reduces operator workload, minimizes
mistakes, and offers you a competitive tool for e-Business use.

119
6 API's

Change KeyesMail Password (CHGKMLPWD)


This API can be used to change the mail account password for any mailbox in
the KeyesMail system.
IBM mail servers use each user's sign-on password for their mail account
password. Each time a user changes their sign-on password, they must also
change their mail account password in the KeyesMail system. Another API
KeyesMail Password API (KMLPWDAPI) can do this for you automatically. It
will call the CHGKMLPWD API every time a user changes their sign-on
password.
To activate the KMLPWDAPI for automatic password changing, you must enter
the following command on your system:
Enter: CHGSYSVAL SYSVAL(QPWDVLDPGM)
VALUE('KMLPWDAPI KMLIB')
Note: You must have the special authority of *SECADM or have specific
authority granted to you, if you are not the owner of a mailbox, in order to
change its password.

Mailbox (MAILBOX)
The default value of *USER is used to change the current user's mailbox. You
may specify another specific mailbox, but you must have *SECADM special
authority to be able to change a password when you are not the owner.

Password (PASSWORD)
The default value of *SAME will not change the existing password for the
specified mailbox. You may key the new password using the proper case (upper
or lower) for each character. If any of the characters are lower case or are
special characters, then you must surround the 'password' with quotes.

120
6 API's

Create a KeyesMail Message (CRTKMMSG)


This program may be used to create a new e-mail message where the recipient's
name and address are passed from one of your applications.
You will be placed on the Work with KeyesMail screen where the program will
allow you to Select an entry to copy using Option 3 or press F6 for a new entry.
This allows you to copy another message (using Option 3) out of your mailbox
that is similar to the new one you wish to create, or simply press the Function 6
key to create a new empty message.

Mailbox (MAILBOX)
Name the mailbox where you wish to create the new e-mail message. The
default value of *USER will create the message in the current user's mailbox.

Recipient's name (NAME)


Use this parameter to pass the name of the recipient to the e-mail message.

Recipient's address (ADDRESS)


Use this parameter to pass the Internet address of the recipient to the e-mail
message.

121
6 API's

Edit a KeyesMail Message (EDTKMMSG)


This program may be used to edit an existing e-mail message, or one that was
just created by another API, such as KMLTXTM. You may pass the address of
a recipient to the API.
You will be placed directly in the existing e-mail message so that you can edit
any part of it and mail it. If you named a recipient address in this API, it will
replace the first address in the existing message. If you leave the address
parameters blank, any existing addresses will be left alone.

Mailbox (MAILBOX)
Name the mailbox where the message exists.

Mail member (MAILMBR)


Name the message member that you wish to edit. You can get this parameter
from the other API's that create an e-mail message or by opening an existing
message and reading the member name from the top line of the screen.

Recipient's name (NAME)


Use this optional parameter to pass the name of a recipient to the e-mail message
(up to 45 characters).

Recipient's address (ADDRESS)


Use this optional parameter to pass the Internet address of the recipient to the e-
mail message (up to 45 characters).

Returned messages (MESSAGE)


This parameter is used to retrieve the completion message that is created by this
API. You must define a variable (78 characters long) that will receive the
completion message.

122
6 API's

Mail Automatic Reply from a Template (KMLAUTORPY)


This program is used to prepare a predefined message and mail it to one or more
recipients. It will copy a mail member used as a template into a new message.
The Internet addresses for up to 10 recipients can be coded in this API, and the
template can also include addresses. The addresses from this API are added to
any addresses found in the template.
The template should be set up with all the appropriate information, ready for
mailing, except for the data that is coded in this API.

Mail member template (MAILMBR)


Use this parameter to name an existing mail member, located in an accessible
mailbox, that you wish to use as a template.
The template message will be copied to a new member, with all existing data
including any addresses and attachments.

To E-mail address (TOADDR)


You may code up to 10 different e-mail addresses for the recipients of this
message. The addresses will be added to any that are already found in the mail
member used as a template. You may code *SAME, in the first address
parameter, if the template already includes all of the addresses desired.

Subject (SUBJECT)
A Subject field can be used to briefly describe the content of the e-mail message.
The subject may be coded in this parameter or you may code *SAME to indicate
that the program should use the subject from the original template.

123
6 API's

Change the Status of a Mail Member (KMLCHGSTS)


This program can be used to change the status of any mail member. This can be
quite handy for marking messages that you have automatically processed with
other API's. For example, you could mark messages with an Answered or
Opened status which will allow the normal Purge program to delete the
members.

Mail member name (MAILMBR)


This is the name of the mail member to be changed.

New status (NEWSTATUS)


The default value of NEW will change the mail member's status to *New,
making it look like a new entry. A value of OPENED will set the status to
Opened and a value of ANSWERED will set the status to Answered. If you
code DELETED in this parameter, the mail member will be moved to the
*Deleted category, allowing it to be purged after the appropriate number of
Purge delay days.

124
6 API's

Mail a PC File as an Attachment (KMLPCFA)


This program is used to prepare a PC file as an Attachment. The attachment will
be added to either a new member that is copied from a template, or to an existing
mail member that was created from a template in a previous API call.
The Internet addresses for up to 10 recipients can be coded in this API, and the
template can also include addresses. The addresses from this API are added to
any addresses found in the template.
The template should be set up with all the appropriate information, ready for
mailing, except for the data that is coded in this API.

Mail member or template name (MAILMBR)


Define a CL variable (10 characters long) and use it to pass the desired value to
this parameter.
Name an existing mail member, located in an accessible mailbox, that you wish
to add this attachment to. Or, you may name a template to make a new mail
member. This parameter is treated like a template if you code *First or *Only
in the Attachment number parameter below. See How to Create a Template in
the Appendix for more information.
If this is a template, it will be copied to a new mail member, with all existing
data, including addresses and other attachments. The new mail member name
will be passed back to your program through this parameter into your CL
variable. The new member name can then be used, to add additional attachments
before mailing, if desired.
The PC file will be converted to an attachment and added to the mail member.
The mail member will then be prepared and placed in "Out Box" ready for
mailing, if the Attachment number parameter is set to *Last or *Only.

To E-mail address (TOADDR)


You may code up to 10 different e-mail addresses for the recipients of the
Physical file member. The addresses will be added to any that are already found
in the mail member used as a template. You may code *SAME, in the first
address parameter, if the template already includes all of the addresses desired.

Subject (SUBJECT)
A Subject field can be used to briefly describe the content of the e-mail message.
The subject may be coded in this parameter or you may code *SAME to indicate
that the program should use the subject from the original template.

From E-mail address (FROMADDR)


You may code an address that will replace the template's From E-mail address,
in this parameter. This is the address that identifies who is sending the e-mail
message, and where replies should be sent. You may code *SAME to use the
From address from the original template.

125
6 API's

PC File name (FILENAME)


This is a 12 character field that is the name of the PC file that you will be
sending as an Attachment.

Folder (FOLDER)
This is a 50 character field that is the name of the Shared Folder where the PC
file can be found.

Description (DESC)
This is a 30 character field that you can use to optionally give a brief description
of this attachment.

Translation code (TRANSLATE)


The PC file will usually be sent as is with no translation, by selecting 0 (None).
You can translate the file into EBCDIC, if desired, by selecting 1 (AtoE) for the
translation code. This would only be useful if you were sending PC text data to
an EBCDIC computer system.

Attachment number (ANUMBER)


The Attachment number parameter allows you to send one or more attachments
with this or other API's. You do this by specifying whether this is the first,
middle, last, or only attachment that will be included with the mail member.
When you specify *First or *Only the mail member that you specify will be
considered a template. It will be copied to a new mail member, then this
attachment will be added to it. The name of the new mail member will be
returned to you in the Mail member or template name parameter.
If you specify *Middle or *Last this attachment will be added to the existing
mail member (it is not copied first).
If you specify *Last or *Only the mail member will be placed in "Out Box"
ready for mailing after the attachment is added.

Compress attachment (COMPRESS)


To compress the attachment, for faster transmission, you may choose one of
these compression codes. The default value of 0 will send the attachment as-is,
with no compression.
Specify 1 for Fast compression with good compression amounts. Code 2 for
Normal compression with better compression amounts at a reasonable speed.
Code 3 for Maximum compression that will take the longest time.
Notes: The filename extension will be changed to .ZIP for compressed
attachments. This option requires PKZIP software to be installed on your iSeries
and available on the library list.

126
6 API's

Encryption (ENCRYPT)
Use this along with compression to password protect a file by encrypting the
data. The default value of 0 will send the attachment as-is, with no encryption.
Specify 1 for the ZipStd algorithm. This algorithm is compatible with other
standard encryption products, such as GZIP. You may code 2 for a ZipAdv -
Advanced Encryption Standard that uses a 128 bit key for Strong Encryption.
Note: This and the following option requires PKZIP software to be installed on
your iSeries and available on the library list.

Encryption password (PASSWORD)


Specifies a password for files that are being encrypted. The password can be up
to 64 characters in length and is case-sensitive.
Note: There is no way to extract a password from an encrypted file. If the
password is forgotten, the file will become inaccessible.

Sample Code
The following code creates a mail message, adds a PC type file as an attachment,
then mails it.

PGM

DCL VAR(&MEMBER) TYPE(*CHAR) LEN(10)


DCL VAR(&ERRMSG) TYPE(*CHAR) LEN(128)

KMLTXTM MAILMBR(&MEMBER) +
TOADDR('someone@theirdomain.com') +
SUBJECT('Monthly information') +
TEXT('Here is this months information +
that we generated on a PC.') +
MAILBOX(SYSTEM) SENDMBR(*NO)
MONMSG MSGID(CPF9898) EXEC(GOTO ERRORS)
KMLPCFA MAILMBR(&MEMBER) TOADDR(*SAME) +
SUBJECT(*SAME) FILENAME(PCfilename) +
FOLDER('/IFSfolder') +
DESC('Your file description') +
ANUMBER(*LAST)
MONMSG MSGID(CPF9898) EXEC(GOTO ERRORS)
GOTO CMDLBL(EXIT)

ERRORS: RCVMSG MSGTYPE(*LAST) MSG(&ERRMSG)


SNDPGMMSG MSG(&ERRMSG) TOUSR(*SYSOPR)
EXIT: ENDPGM

127
6 API's

Mail Physical File Member as an Attachment (KMLPFMA)


This program is used to prepare a Physical file member as an Attachment. The
attachment will be added to either a new member that is copied from a template,
or to an existing mail member that was created from a template in a previous
API call.
The Internet addresses for up to 10 recipients can be coded in this API, and the
template can also include addresses. The addresses from this API are added to
any addresses already found in the template.
The template should be set up with all the appropriate information, ready for
mailing, except for the data that is coded in this API.

Mail member or template name (MAILMBR)


Define a CL variable (10 characters long) and use it to pass the desired value to
this parameter.
Name an existing mail member that you wish to add an attachment to, or you
may name a template for the program to copy. This parameter is treated like a
template if you code *First or *Only in the Attachment number parameter
below.
If this is a template, it will be copied to a new mail member, with all existing
data, including addresses and other attachments. The new mail member name
will be passed back to your program through this parameter into your CL
variable. The new member name can then be used, to add additional attachments
before mailing, if desired.
The Physical file member will be converted to an attachment and added to the
mail member. The mail member will then be prepared and placed in "Out Box"
ready for mailing, if the Attachment number parameter is set to *Last or *Only.

To E-mail address (TOADDR)


You may code up to 10 different e-mail addresses for the recipients of the
Physical file member. The addresses will be added to any that are already found
in the mail member. You may code *SAME, in the first address parameter, to
use only the existing addresses.

Subject (SUBJECT)
A Subject field can be used to briefly describe the content of the e-mail message.
Code the subject in this parameter or code *SAME to use the subject from the
original template.

From E-mail address (FROMADDR)


You may code an address that will replace the template's From E-mail address,
in this parameter. This is the address that identifies who is sending the e-mail
message, and where replies should be sent. You may code *SAME to use the
From address from the original template.

128
6 API's

File name (FILENAME)


This is a 10 character field that is the name of the Physical file that you will be
sending as an Attachment.

Member name (MEMBER)


This is a 10 character field that is the name of the Physical file member that you
wish to e-mail.

Library (LIBRARY)
This is a 10 character field that identifies the library where the Physical file can
be found. The default value of *LIBL tells the program to search the current
library list for the file. You may also enter *CURLIB to search the current
library for the file.

Description (DESC)
This is a 30 character field that you can use to optionally give a brief description
of this attachment.

Translation code (TRANSLATE)


The Physical file member can be sent as is with no translation, if you select 0
(None). This would usually only be sent to another iSeries, AS/400, or another
EBCDIC computer.
If the file is being sent to an ASCII machine, such as a PC, you can translate the
file to ASCII using a translation code of 2 (EtoA) or 3 (CSV / Comma Separated
Values). CSV files are easily imported into spread sheets, such as Excel.
It is unusual but possible to translate the data to EBCDIC, if the iSeries file was
an ASCII file, using a code of 1 (AtoE).

Attachment number (ANUMBER)


The Attachment number parameter allows you to send one or more attachments
with this or other API's. You do this by specifying whether this is the first,
middle, last, or only attachment that will be included with the mail member
before it is mailed.
When you specify *First or *Only the mail member will be treated as a
template. It will be copied to a new mail member, then this attachment will be
added to it. The name of the new mail member will be returned to you in the
Mail member or template name parameter.
If you specify *Middle or *Last this attachment will be added to the existing
mail member (it is not copied first).
If you specify *Last or *Only the mail member will be placed in "Out Box"
ready for mailing after the attachment is added.

129
6 API's

Compress attachment (COMPRESS)


To compress the attachment, for faster transmission, you may choose one of
these compression codes. The default value of 0 will send the attachment as-is,
with no compression.
Specify 1 for Fast compression with good compression amounts. Code 2 for
Normal compression with better compression amounts at a reasonable speed.
Code 3 for Maximum compression that will take the longest time.
Notes: The filename extension will be changed to .ZIP for compressed
attachments. This option requires PKZIP software to be installed on your iSeries
and available on the library list.

Encryption (ENCRYPT)
Use this along with compression to password protect a file by encrypting the
data. The default value of 0 will send the attachment as-is, with no encryption.
Specify 1 for the ZipStd algorithm. This algorithm is compatible with other
standard encryption products, such as GZIP. You may code 2 for a ZipAdv -
Advanced Encryption Standard that uses a 128 bit key for Strong Encryption.
Note: This option requires PKZIP software to be installed on your iSeries and
available on the library list.

Encryption password (PASSWORD)


Specifies a password for files that are being encrypted. The password can be up
to 64 characters in length and is case-sensitive.
Note: There is no way to extract a password from an encrypted file. If the
password is forgotten, the file will become inaccessible.

130
6 API's

Sample Code
The following code creates a mail message, adds a physical file member as an
attachment, then mails it.

PGM

DCL VAR(&MEMBER) TYPE(*CHAR) LEN(10)


DCL VAR(&ERRMSG) TYPE(*CHAR) LEN(128)

KMLTXTM MAILMBR(&MEMBER) +
TOADDR('someone@home.com') +
SUBJECT('System failure message') +
TEXT('The system has failed to complete +
the weekend process.') +
MAILBOX(SYSTEM) SENDMBR(*NO) +
RMVMSG(*YES) PRIORITY(H)
MONMSG MSGID(CPF9898) EXEC(GOTO ERRORS)
KMLPFMA MAILMBR(&MEMBER) TOADDR(*SAME) +
SUBJECT(*SAME) FILENAME(yourfile) +
MEMBER(yourmbr) LIBRARY(yourlib) +
DESC('Your file description') +
ANUMBER(*LAST)
MONMSG MSGID(CPF9898) EXEC(GOTO ERRORS)
GOTO CMDLBL(EXIT)

ERRORS: RCVMSG MSGTYPE(*LAST) MSG(&ERRMSG)


SNDPGMMSG MSG(&ERRMSG) TOUSR(*SYSOPR)
EXIT: ENDPGM

131
6 API's

Save an Attachment to Disk (KMLSAVAT)


This program is used to automatically save an attachment to your iSeries disk. It
is intended to be used to automate the receiving of attachments that are sent
regularly to your KeyesMail system from others on the Internet.
In order to completely automate the receiving of attachments, you should call
this API when mail is received for a particular Mailbox, from a specific Sender,
or with a specific Subject. This information is available, when mail is received,
in the KMLADD CL program.
The KMLADD program, at line #125, contains a good place for you to use this
API. You would check one or more of the parameters &MAILBOX,
&REPLYTO, and &SUBJECT then submit a CL program that uses this
KMLSAVAT API against the &NEWMBR parameter to save the attachment to
your iSeries each time you receive the expected mail.

Mail member (MAILMBR)


This is the name of the Mail member that contains the attachment that you intend
to save. You must have access to the Mailbox that this member is located in.

Attachment number (ANUMBER)


Code the attachment number to be saved in this parameter. Up to 99 attachments
may be received in each MIME compliant message.

Filename (FILENAME)
The name of the file that will be saved is coded in this parameter. You can code
*SAME, which will use the name of the file that was originally sent by the
sender.

Description (DESC)
This will be used as the text description on the saved attachment. You can code
*SAME, which will use the description as it was originally sent by the sender.

Type of attachment (TYPE)


You must code the type of attachment to be saved.
1) PC Text file to be saved into a Shared Folder.
2) PC Binary file to be saved into a Shared Folder.
3) iSeries Physical file to be saved to a Library.
4) iSeries Source Physical file to be saved to a Library.
5) iSeries Spooled file to be saved to an Output Queue.
6) iSeries Save file to be saved to a Library.

132
6 API's

Translation code (TRANSLATE)


Attachments can be saved as is with no translation, if you select translation code
0 (None).
Attachments can be translated from ASCII to EBCDIC if you choose translation
code 1 (AtoE).
Attachments can be translated from EBCDIC to ASCII if you choose translation
code 2 (EtoA).
Attachments can be unencrypted from an Archive, if you have PKZIP on your
library list. To do this, choose translation code 3 (UnEncr).

Record length (RECLN)


If you are saving either a Physical File or a Source File, you must give the length
of the file, if the file does not already exist on your iSeries. The length is used
when creating new files, only.

Folder (FOLDER)
If you are saving either a PC Text of PC Binary file, you must name the Shared
Folder where you want it to be placed. The folder must already exist and you
must have access to it.

Library (LIBRARY)
When you save a Physical File, Source File, or Save File you must name the
library where you want it to be placed. The library must already exist and you
must have access to it.

Member name (MEMBER)


When you save a Physical File or a Source File, you must name the member
where you want it to be saved.

Output Queue (OUTQ)


When you save a Spooled File you must name the output queue where you want
it to be saved. The attachment must be a Spooled file that came directly from
another iSeries, untranslated.

Encryption password (PASSWORD)


If the attachment was encrypted with a password, you may be able to unencrypt
it, by supplying the correct case-sensitive password. This cannot be used when
saving PC Text or PC Binary attachments. If can only be used for unencrypting
Physical Files, Source Files, Spooled Files (saved as-is), and Save Files.
The original Filename of the attachment that you are saving must have an
extension of .ZIP. Set the Translation code to 3 for unencryption.

133
6 API's

Sample Code
The following code could be placed at line #125 in the CL program called
KMLADD. The source code for this is located in QCLSRC in KMLIB. It
would look for mail coming into a Mailbox called INVENTORY with a Subject
of "Weekly Inventory". When this is found it would submit this API to save the
attachment into an Inventory file.

IF COND(&MAILBOX *EQ INVENTORY *AND +


&SUBJECT *EQ 'Weekly Inventory') THEN(DO)
SBMJOB CMD(KMLSAVAT MAILMBR(&NEWMBR) +
ANUMBER(1) FILENAME(INVFILE) +
DESC(*SAME) TYPE(3) LIBRARY(INVLIB) +
MEMBER(INVMBR)) JOBQ(QBATCH) +
INLLIBL(*CURRENT)
MONMSG MSGID(CPF9898)
ENDDO

134
6 API's

Mail a Spool File as an Attachment (KMLSPLFA)


This program is used to prepare a spool file as an attachment. The attachment
will be added to either a new member that is copied from a template, or to an
existing mail member that was created in a previous API call.
The Internet addresses for up to 10 recipients can be coded in this API, and the
original message or template can also include addresses. The addresses from
this API are added to any addresses found in the message.
This API also has the ability to send a "multipart/alternative" version of the
original message in an HTML format.

Mail member or template name (MAILMBR)


Define a CL variable (10 characters long) and use it to pass the desired value to
this parameter.
Name an existing mail member, located in an accessible mailbox, that you wish
to add this attachment to. Or, you may name a template to make a new mail
member. This parameter is treated like a template if you code *First or *Only
in the Attachment number parameter below. See How to Create a Template in
the Appendix for more information.
If this is a template, it will be copied to a new mail member, with all existing
data, including addresses and other attachments. The new mail member name
will be passed back to your program through this parameter into your CL
variable. The new member name can then be used, to add additional attachments
before mailing, if desired.
The Spool file will be converted to an attachment and added to the mail member.
The mail member will then be prepared and placed in "Out Box" ready for
mailing, if the Attachment number parameter is set to *Last or *Only.

To E-mail address (TOADDR)


You may code up to 10 different e-mail addresses for the recipients of the spool
file. The addresses will be added to any that are already found in the mail
member. You may code *SAME, in the first address parameter, if the template
already includes all of the addresses desired.

Subject (SUBJECT)
A Subject field can be used to briefly describe the content of the e-mail message.
The subject may be coded in this parameter or you may code *SAME to indicate
that the program should use the subject from the original mail member.

From E-mail address (FROMADDR)


You may code an address that will replace the template's From E-mail address,
in this parameter. This is the address that identifies who is sending the e-mail
message, and where replies should be sent. You may code *SAME to indicate
that the program should use the From address from the original template.

135
6 API's

Spooled file (SPLFILE)


This is a 10 character field that is the name of the spooled file that you wish to e-
mail. This comes from the name of the printer output file that is defined in the
program that created it.

Description (SPLDESC)
This is a 30 character field that you can use to briefly describe the contents of the
spool file.

Job name (JOBNAME)


This is a 10 character field that identifies the job that built the spooled file. You
may specify * to designate the current job, when calling the program from an
application.

Number (NUMBER)
This is a 6 character field used to specify the number of the job that created the
spooled file. You may leave this parameter blank if you coded * for the Job
Name parameter above.

Spooled file number (SPLNBR)


This is a 5 character field used to separate multiple spooled files from the same
job. The default is *LAST. You may specify *ONLY, *LAST, or the specific
number to select the desired entry.

Remove SplF after preparing (RMVSPLF)


This is a 4 character field that defaults to *NO. If you specify *YES, the spool
file entry will be removed after it has been prepared as an attachment for a new
message. Otherwise, the spool file will be left in the Output Queue.

Translation code (TRANSLATE)


The spool file can be sent as a spool file with no translation, if you select 0
(None), but only to another iSeries or AS/400. The other iSeries can restore the
spool file to one of its output queues. If the recipient does not have KeyesMail
software on their iSeries, you can send them the instructions as described in the
Appendix.
Selected pages of the spooled file can be sent if you translate it.
You can send HTML as a multipart/alternative version of a Text message, using
translation code 1. The original text message would have been created using
KMLSPLFM.
You can translate an *SCS spooled file into ASCII text (translation 2), however,
this will not contain any page formatting. Each print line will simply be

136
6 API's

followed by a CR/LF.
You can translate AFPDS or *USERASCII spooled files into TIFF Images
(translation 3). These can be viewed and printed by PC users, as well. All
windows based PC's have TIFF viewers available to them, for example the Wang
viewer or the Kodak viewer.
Rich Text Format (translation 4) is a convenient format for sending *SCS
spooled files to a PC user. Most PC's will have an RTF reader (MS Word, Lotus
WordPro, & WordPerfect are examples) that can easily view and print the
document by simply clicking on the received attachment. The RTF file will
contain all the page and font formatting necessary to print each spooled page
properly, without any user intervention. KeyesMail will use the Page Width and
Page Length spooled file attributes to determine the proper font sizes.
Portable Document Format (translation 6) is a popular way of sending any type
of spooled file. Adobe's Acrobat reader is available to most personal computers
for free on the Web. KeyesMail will use the Page Width and Page Length
spooled file attributes to determine the proper font sizes.

From page number (FROMPAGE)


This is a 3 digit number that defaults to 1. This selects the first page that is taken
out of the spool file to be included in the attachment.

To page number (TOPAGE)


This is a 3 digit number that defaults to 999. You may specify a smaller number
here if you do not wish to include the entire spool file in the attachment.
Note: If you select a translation code of 0 (None) or 3 (IMG), the entire spool
file will be sent regardless of the From and To page parameters.

Attachment number (ANUMBER)


The Attachment number parameter allows you to send one or more attachments
with this or other API's. You do this by specifying whether this is the first,
middle, last, or only attachment that will be included with the mail member
before it is mailed.
When you specify *First or *Only the mail member that you specify will be
considered a template. It will be copied to a new mail member, then this
attachment will be added to it. The name of the new mail member will be
returned to you in the Mail member or template name parameter.
If you specify *Middle or *Last this attachment will be added to the existing
mail member (it is not copied first).
If you specify *Last or *Only the mail member will be placed in "Out Box"
ready for mailing after the attachment is added.

137
6 API's

Compress attachment (COMPRESS)


To compress the attachment, for faster transmission, you may choose one of
these compression codes. The default value of 0 will send the attachment as-is,
with no compression.
Specify 1 for Fast compression with good compression amounts. Code 2 for
Normal compression with better compression amounts at a reasonable speed.
Code 3 for Maximum compression that will take the longest time.
Notes: The filename extension will be changed to .ZIP for compressed
attachments. This option requires PKZIP software to be installed on your iSeries
and available on the library list.

Encrypt with Password (ENCRYPT)


Use this along with compression to password protect a file by encrypting the
data. The default value of 0 will send the attachment as-is, with no encryption.
Specify 1 for the ZipStd algorithm. This algorithm is compatible with other
standard encryption products, such as GZIP. You may code 2 for a Zip
Advanced Encryption Standard that uses a 128 bit key for Strong Encryption.
Specify 3 to create an encrypted PDF document. You must specify a User
Password and/or an Owner Password for this option.
Note: Zip encryption options 1 & 2 require PKZIP software to be installed on
your iSeries and available on the library list.

Encryption password (PASSWORD)


Specifies a password for files that are being encrypted by PKZIP. The password
can be up to 64 characters in length and is case-sensitive. Therefore, you should
enter the password within single quotes, to keep the case that you type.
Note: There is no way to extract a password from an encrypted file. If the
password is forgotten, the file will become inaccessible.

User Password (USERPWD)


You may supply a user password, if you wish to encrypt a PDF. This password
will allow a user to view and optionally print & annotate the PDF document.
The user will not be able to change the PDF.
Enter the password within single quotes. The string may be up to 32 characters
long and IS case-sensitive.

Owner Password (OWNERPWD)


You may supply an owner password, if you wish to encrypt a PDF. This
password will allow the owner to do anything with the PDF document.
Enter the password within single quotes. The string may be up to 32 characters
long and IS case-sensitive.

138
6 API's

Sample Code
The following code creates a mail message, adds a spooled file translated to a
PDF as an attachment, then mails it.

PGM

DCL VAR(&MEMBER) TYPE(*CHAR) LEN(10)


DCL VAR(&ERRMSG) TYPE(*CHAR) LEN(128)

OVRPRTF FILE(ORDERS) HOLD(*YES)


CALL PGM(your-PO-pgm)
DLTOVR FILE(ORDERS)

KMLTXTM MAILMBR(&MEMBER) +
TOADDR('customer@their.com') +
SUBJECT('Purchase Order') +
TEXT('Here is the Purchase Order +
that we discussed.') +
MAILBOX(POSTMASTER) SENDMBR(*NO) +
MONMSG MSGID(CPF9898) EXEC(GOTO ERRORS)

KMLSPLFA MAILMBR(&MEMBER) TOADDR(*SAME) +


SUBJECT(*SAME) SPLFILE(ORDERS) +
SPLDESC('Purchase Order.PDF') +
JOBNAME(*) SPLNBR(*LAST) RMVSPLF(*YES) +
TRANSLATE(6) ANUMBER(*LAST)
MONMSG MSGID(CPF9898) EXEC(GOTO ERRORS)
GOTO CMDLBL(EXIT)

ERRORS: RCVMSG MSGTYPE(*LAST) MSG(&ERRMSG)


SNDPGMMSG MSG(&ERRMSG) TOUSR(*SYSOPR)
EXIT: ENDPGM

139
6 API's

Mail a Spool File as a Message (KMLSPLFM)


This program is used to prepare a spool file as one or more e-mail messages.
The Internet addresses of the recipients can be hard coded in this API, or you
can specify that the addresses are taken from the spooled data. Up to 10
different recipients can be coded on each page.
The e-mail message can be sent as either Text or an HTML message, depending
on the Content type parameter value. Text messages are limited to 76 characters
wide, whereas HTML will be sent at the width of the spooled file.

First mail member created (MAILMBR)


Define a CL variable (10 characters long) and code the variable name here. This
is a required parameter.
You may use this parameter to receive the name of the first mail member that
will be created for this spooled file. You will need this name if you intend to
add attachments, using another API, to the mail before it is sent.
Note: If you intend to add one or more attachments to the mail before it is sent,
be sure to use *NO on the (SENDMBR) parameter, so that the message will not
be mailed before the next API has a chance to add the attachments.

To E-mail address (TOADDR)


You may code up to 10 different e-mail addresses for the recipients of the spool
file. The addresses may be hard coded in this parameter or you may code
*SCAN or *LOC values to indicate that the program should retrieve the
addresses from the spooled data. Combinations of addresses, *SCAN, and
*LOC values can be used together.

*SCAN(xxx)
Use *SCAN to tell the program how to find the addresses in the spooled data.
For example, *SCAN(To:) would tell the program to scan each page for the
characters To:. If these characters are found, the address is taken from the 60
characters that follow in the spooled data.
Two adjacent blanks in the spooled data will end the address. For example, if
you coded *SCAN(To:) and a spool line contained:
> To: "John Doe" <jdoe@somecompany.net> Other information ...
The address would be "John Doe" <jdoe@somecompany.net>. The two
blanks just before the words (Other information) will prevent the program from
considering those words as part of the address.

*LOC(L=xx,C=xxx):
Use *LOC to tell the program exactly where to find each address on each page
of the spooled data. For example *LOC(L=5,C=15) would tell the program to
start looking in column 15 of line 5 on each page for an address. If any data is
found in that location within 60 characters, this will be used as the address.

140
6 API's

Two adjacent blanks in the spooled data will end the address. For example, if
you coded *LOC(L=5,C=3) and line 5 contained:
> jdoe@somecompany.net (John Doe) Other information ...
The address would be jdoe@somecompany.net (John Doe). The two blanks
just before the words (Other information) will prevent the program from
considering those words as part of the address.

Coding rules
Combinations of hard coded addresses, *SCAN, and *LOC values can be used
together. Any hard coded addresses will be used for all pages. Addresses found
in the spooled data using the *SCAN or *LOC parameters will only be used on
the pages where they were found.
If no new addresses are found for a page, or if all of the new addresses are
exactly the same, the data on that page will be considered a continuation of the
previous page. If any address is different, a new message will be started and it
will be sent to the new list of recipients.

Subject (SUBJECT)
A Subject field can be used to briefly describe the content of the e-mail message.
The subject may be hard coded in this parameter or you may code *SCAN or
*LOC values to indicate that the program should retrieve the subject from the
spooled data.

*SCAN(xxx)
Use *SCAN to tell the program how to find the subject in the spooled data. For
example, *SCAN(Subj:) would tell the program to scan each page for the
characters Subj:. If these characters are found, the subject is taken from the 60
characters that follow in the spooled data.
Two adjacent blanks in the spooled data will end the subject. For example, if you
coded *SCAN(Subj:) and a spool line contained:
> Subj: Purchase Requisition #4563 Other information ...
The subject would be Purchase Requisition #4563. The two blanks just before
the words (Other information) will prevent the program from considering those
words as part of the subject.

*LOC(L=xx,C=xxx)
Use *LOC to tell the program exactly where to find the subject on each page of
the spooled data. For example *LOC(L=5,C=15) would tell the program to
start looking in column 15 of line 5 on each page for the subject. If any data is
found in that location within 60 characters, this will be used as the subject.
Two adjacent blanks in the spooled data will end the subject. For example, if you
coded *LOC(L=5,C=3) and line 5 contained:
> Purchase Requisition #4563 Other information ...
The subject would be Purchase Requisition #4563. The two blanks just before
the words (Other information) will prevent the program from considering those
words as part of the subject.

141
6 API's

Coding rules
If you hard code a subject it will be used for all pages. If you have coded a
*SCAN or a *LOC value for the subject, each new subject found will start a new
message, even if all of the recipient addresses are the same.
If no new subject is found for a page, or if the subject is exactly the same, the
data on that page will be considered a continuation of the previous page,
assuming none of the recipient addresses had changed.

From E-mail address (FROMADDR)


You may code an address that will replace the Return E-mail address, in this
parameter. This is the address that identifies who is sending the e-mail message,
and where replies should be sent. You may code *SAME to indicate that the
program should use the Return address from the mailbox that the message is
created in.

Spooled file (SPLFILE)


This is a 10 character required field that is the name of the spooled file that you
wish to e-mail. This comes from the name of the printer output file that you
define in your program.

Job name (JOBNAME)


This is a 10 character required field that identifies the job that built the spooled
file. You may specify * to designate the current job, when calling the program
from an application.

Number (NUMBER)
This is a 6 character field used to specify the number of the job that created the
spooled file. You may leave this parameter blank if you coded * for the Job
Name parameter above.

Spooled file number (SPLNBR)


This is a 5 character field used to separate multiple spooled files from the same
job. The default is *LAST. You may specify *ONLY, *LAST, or the specific
number to select the desired entry.

Remove SplF after preparing (RMVSPLF)


This is a 4 character field that defaults to *NO. If you specify *YES, the spool
file entry will be removed after it has been prepared as one or more e-mail
messages. Otherwise, the spool file will be left in the Output Queue.

142
6 API's

From mailbox (MAILBOX)


Enter the name of a valid mailbox that the e-mail messages will be sent from.
The mailbox supplies the Return address that is placed in the message. The user
running this program must have access to the specified mailbox.
You may leave the default value of *USER which will use the current user-id as
the mailbox.

Category (CATEGORY)
Enter the category that you wish to have the messages placed in. If you leave it
blank, it will default to 'Transmitted SplFs'.

Send the member to Out Box (SENDMBR)


The default value of *YES will send the new mail members to Out Box for
mailing on the next mail run. If you specify *NO the message will not be
mailed. This should only be used if you intend to add attachments to the
message before mailing.

Remove message after sending (RMVMSG)


This 4 character field defaults to *NO. Enter *YES if you would like the
program to set the Auto Purge field to "Y" in the messages. This will cause the
message to be automatically deleted after it is sent.

Priority (PRIORITY)
This field is used to mark how important a message is or how soon it should be
sent. (L=Low, N=Normal, H=High)

From page number (FROMPAGE)


This is a 3 digit number that defaults to 1. This selects the first page that is taken
out of the spool file to be converted into an e-mail message.

To page number (TOPAGE)


This is a 3 digit number that defaults to 999. You may specify a smaller number
here if you do not wish to convert all pages of a spool file into an e-mail
message.

143
6 API's

Delivery Status Notification (DSN)


This field is used to mark when you want the Internet SMTP servers to notify
you of the Delivery Status of this e-mail message. The default value of N
(Normal) will usually send you back a standard failure message, if the e-mail is
undeliverable.
You may enter F (Failures) which will cause a delivery status message to be
sent, if the message fails to be delivered.
If you enter S (Successes) the Internet will send back a delivery status message,
when it is successfully delivered, relayed to a server that does not have delivery
status capability, or when a list has been expanded by a list server.
You may enter B (Both) to have delivery status messages sent when it either
fails or is successfully delivered, relayed, or expanded.

Request a Read Receipt (REQRR)


This field can be used to request a Read Receipt from the recipient of this piece
of mail. If the recipient allows it, a receipt will be sent back to the return
address, when the user opens their mail.
Receipts are only sent from recipients that are directly addressed in the mail.
Blind copies and recipients in a list will typically not send a receipt.

Content type (CONTENT)


Use this field to specify what type of message is being sent. The default value of
*TEXT is used for regular Text spooled files. Text will be wrapped at 76
characters wide. You may code *HTML for the Content type field to send the
spooled file as an HTML message. You can either code all of the HTML tags in
your spooled file, or the system will add the following tags to make the spooled
file text into preformatted HTML, if it does not find <HTML> in your spooled
file:
<HTML><BODY><PRE>
your spooled file
</PRE></BODY></HTML>
The HTML that you send is not limited to text. It can contain Images and
website references, as long as those references are available to the recipient.

Reply-to Address (REPLYTO)


You may code an address that will be used for replies to this e-mail message.
You should code this address only if it is different than the From Address.

144
6 API's

Sample Code
The following code creates a Weekly Sales Report in two different formats; one
in Text and the other HTML. It then e-mails this as a multipart/alternative
message to an address found in the Text spooled file.

PGM

DCL VAR(&MEMBER) TYPE(*CHAR) LEN(10)


DCL VAR(&ERRMSG) TYPE(*CHAR) LEN(128)

OVRPRTF FILE(TEXTRPT) HOLD(*YES)


OVRPRTF FILE(HTMLRPT) HOLD(*YES)
CALL PGM(your-pgm)
DLTOVR FILE(TEXTRPT HTMLRPT)

KMLSPLFM MAILMBR(&MEMBER) TOADDR('*SCAN(To:)') +


SUBJECT('Weekly Sales Report') +
SPLFILE(TEXTRPT) JOBNAME(*) +
SPLNBR(*LAST) RMVSPLF(*YES) +
MAILBOX(*USER) CATEGORY('Weekly Sales +
Reports') SENDMBR(*NO)
MONMSG MSGID(CPF9898) EXEC(GOTO ERRORS)

KMLSPLFA MAILMBR(&MEMBER) SPLFILE(HTMLRPT) +


SPLDESC('HTML version') JOBNAME(*) +
RMVSPLF(*YES) TRANSLATE(1) ANUMBER(*LAST)
MONMSG MSGID(CPF9898) EXEC(GOTO ERRORS)

GOTO CMDLBL(EXIT)

ERRORS: RCVMSG MSGTYPE(*LAST) MSG(&ERRMSG)


SNDPGMMSG MSG(&ERRMSG) TOUSR(*SYSOPR)
EXIT: ENDPGM

145
6 API's

Mail a Spool File with a Message (KMLSPLFWM)


This program is used to prepare a spooled file as an Attachment, and send it with
a brief message. It allows you to enter all the addresses, subject, and message in
the command itself or you can edit the prepared message to supply these values.
The name of the e-mail member is placed in the LDA in positions 1-10. You can
retrieve this member name after running the API and use it to add additional
attachments to the message.

From mailbox (MAILBOX)


Enter the name of a valid mailbox that the e-mail message will be sent from.
The mailbox supplies the Return address that is placed in the message, unless it
is overridden using the FROMADDR parameter below. The user running this
program must have access to the specified mailbox.
You may leave the default value of *USER which will use the current user-id as
the mailbox. If the specified mailbox does not exist or is not accessible, the
POSTMASTER mailbox will be used.

To E-mail address (TOADDR)


You may code up to 10 different e-mail addresses for the recipients of the
spooled file. You should surround each value with 'single quotes' to enter lower
case characters in this parameter.

Subject (SUBJECT)
A Subject field can be used to briefly describe the content of the e-mail message.
You should surround the value with 'single quotes' to enter lower case characters
and spaces in this parameter.

From E-mail address (FROMADDR)


You may code an address that will replace the mailbox's From E-mail address, in
this parameter. This is the address that identifies the sender of the e-mail
message, and where replies should be sent. You may leave the default value of
*SAME to indicate that the program should use the normal From address of the
mailbox being used.
You should surround any address with 'single quotes' to enter lower case
characters in this parameter.

Spooled file (SPLFILE)


This is a 10 character required field that is the name of the spooled file that you
wish to e-mail, as an attachment.

146
6 API's

Description (SPLDESC)
This is a 30 character field that you can use to briefly describe the contents of the
spooled file, or to specify a long filename.ext for the attachment. If you enter a
filename extension, in the description, this will be used to replace the default
filename that is generated by the program.

Job name (JOBNAME)


This is a 10 character required field that identifies the job that built the spooled
file. You may specify * to designate the current job, when calling this program
from an application.

Number (JOBNBR)
This is a 6 character field used to specify the number of the job that created the
spooled file. You may leave this parameter blank if you coded * for the Job
Name parameter above.

Spooled file number (SPLNBR)


This is a 5 character field used to separate multiple spooled files from the same
job. The default value is *LAST, meaning the last spooled file created for the
job. You may specify *ONLY or the specific number to select a desired entry.

Remove SplF after preparing (RMVSPLF)


This is a 4 character field that defaults to *NO. If you specify *YES, the
spooled file entry will be removed after it has been prepared as an attachment for
this message. Otherwise, the spooled file will be left in the Output Queue, on
Hold.

Translation code (TRANSLATE)


The spool file can be sent as a spool file with no translation, if you select 0
(None), but only to another iSeries or AS/400 computer.
You can translate an *SCS spooled file into ASCII text (translation 2), Rich Text
Format (translation 4), Portable Document Format (translation 6), or you can
map (translation 5) spooled data onto an overlay. KeyesMail will use the Page
Width and Page Length spooled file attributes to determine the proper font sizes,
for RTF and PDF documents.
You can translate AFPDS or *USERASCII spooled files into TIFF Images
(translation 3) or Portable Document Format (translation 6). KeyesMail will
use the Page Width and Page Length spooled file attributes to determine the
proper font sizes.

147
6 API's

Text message (TEXT)


You may enter up to 1024 characters of text for the message. The text will be
broken into 76 character lines, at word boundaries. You must surround the
entire text message with 'single quotes'.

Edit the message (EDITMSG)


This is a 1 character field that defaults to N. If you code a Y the program will
open the piece of mail with the Message Editor. This will allow you to alter the
message or add addresses, using the Phonebook. The message is edited before
the attachment is added, so be sure not to try to mail the message after editing it.

Send the member to Out Box (SENDMBR)


This is a 4 character field that determines whether or not the program will mail
the message after adding the attachment. The default value of *YES sends the
member as soon as it is prepared.
Specify *NO if you would like the program to prepare the message but not mail
it yet. This will allow you to add additional attachments to the same message
before it is mailed. To do this, you will need to know the name of the message
member that this API creates. The API will save the new member name in the
LDA in columns 1 - 10, where you can extract it.

Remove message after sending (RMVMSG)


This 4 character field defaults to *NO. Enter *YES if you would like the
program to set the Auto Purge field to "Y" in the message. This will cause the
message to be automatically deleted after it is sent.

From page number (FROMPAGE)


This is a 3 digit number that defaults to 1. This selects the first page that is taken
out of the spool file to be included in the attachment.

To page number (TOPAGE)


This is a 3 digit number that defaults to 999. You may specify a smaller number
here if you do not wish to include the entire spool file in the attachment.
Note: If you select a translation code of 0 (None) or 3 (IMG), the entire spool
file will be sent regardless of the From and To page parameters.

Compress attachment (COMPRESS)


To compress the attachment, for faster transmission, you may choose one of
these compression codes. The default value of 0 will send the attachment as-is,
with no compression.

148
6 API's

Specify 1 for Fast compression with good compression amounts. Code 2 for
Normal compression with better compression amounts at a reasonable speed.
Code 3 for Maximum compression that will take the longest time.
Notes: The filename extension will be changed to .ZIP for compressed
attachments. This option requires PKZIP software to be installed on your iSeries
and available on the library list.

Encrypt with Password (ENCRYPT)


Use this along with compression to password protect a file by encrypting the
data. The default value of 0 will send the attachment as-is, with no encryption.
Specify 1 for the ZipStd algorithm. This algorithm is compatible with other
standard encryption products, such as GZIP. You may code 2 for a Zip
Advanced Encryption Standard that uses a 128 bit key for Strong Encryption.
Specify 3 to create an encrypted PDF document. You must specify a User
Password and/or an Owner Password for this option.
Note: Zip encryption options 1 & 2 require PKZIP software to be installed on
your iSeries and available on the library list.

Encryption password (PASSWORD)


Specifies a password for files that are being encrypted by PKZIP. The password
can be up to 64 characters in length and is case-sensitive. Therefore, you should
enter the password within single quotes, to keep the case that you type.
Note: There is no way to extract a password from an encrypted file. If the
password is forgotten, the file will become inaccessible.

User Password (USERPWD)


You may supply a user password, if you wish to encrypt a PDF. This password
will allow a user to view and optionally print & annotate the PDF document.
The user will not be able to change the PDF.
Enter the password within single quotes. The string may be up to 32 characters
long and IS case-sensitive.

Owner Password (OWNERPWD)


You may supply an owner password, if you wish to encrypt a PDF. This
password will allow the owner to do anything with the PDF document.
Enter the password within single quotes. The string may be up to 32 characters
long and IS case-sensitive.

Priority (PRIORITY)
This field is used to mark how important a message is or how soon it should be
sent. (L=Low, N=Normal, H=High)

149
6 API's

Delivery Status Notification (DSN)


This field is used to mark when you want the Internet SMTP servers to notify
you of the Delivery Status of this E-mail message. The default value of N
(Normal) will usually send you back a standard failure message, if the e-mail is
undeliverable.
You may enter F (Failures) which will cause a delivery status message to be
sent, if the message fails to be delivered.
If you enter S (Successes) the Internet will send back a delivery status message,
when it is successfully delivered, relayed to a server that does not have delivery
status capability, or when a list has been expanded by a list server.
You may enter B (Both) to have delivery status messages sent when it either
fails or is successfully delivered, relayed, or expanded.

Request a Read Receipt (REQRR)


This field can be used to request a Read Receipt from the recipient of this piece
of mail. If the recipient allows it, a receipt will be sent back to the return
address, when the user opens their mail.
Receipts are only sent from recipients that are directly addressed in the mail.
Blind copies and recipients in a list will typically not send a receipt.

Reply-to Address (REPLYTO)


You may code an address that will be used for replies to this e-mail message.
You should code this address only if it is different than the From Address.

150
6 API's

Sample Code
The following code creates an Invoice in a spooled file. It prepares an e-mail
message, adds the Invoice as a PDF attachment, adds another PDF as a second
attachment, and mails it.

PGM

DCL VAR(&ADDRESS) TYPE(*CHAR) LEN(60)


DCL VAR(&ERRMSG) TYPE(*CHAR) LEN(128)
DCL VAR(&MAILMBR) TYPE(*CHAR) LEN(10)

OVRPRTF FILE(QPRINT) HOLD(*YES)


CALL PGM(your-pgm) PARM(&ADDRESS)
DLTOVR FILE(QPRINT)

KMLSPLFWM MAILBOX(POSTMASTER) +
TOADDR(&ADDRESS) +
SUBJECT('Invoice') +
FROMADDR('sales@domain.com')
SPLFILE(QPRINT) JOBNAME(*) +
SPLNBR(*LAST) RMVSPLF(*YES) +
TRANSLATE(6) TEXT('Attached you +
will find our invoice') SENDMBR(*NO)
MONMSG MSGID(CPF9898) EXEC(GOTO ERRORS)
RTVDTAARA DTAARA(*LDA (1 10)) RTNVAR(&MAILMBR)
KMLPCFA MAILMBR(&MAILMBR) FILENAME(PCFILE.PDF) +
FOLDER('/HOME') ANUMBER(*LAST)
MONMSG MSGID(CPF9898) EXEC(GOTO ERRORS)
GOTO CMDLBL(EXIT)

ERRORS: RCVMSG MSGTYPE(*LAST) MSG(&ERRMSG)


SNDPGMMSG MSG(&ERRMSG) TOUSR(*SYSOPR)
EXIT: ENDPGM

151
6 API's

Mail a Text Message (KMLTXTM)


This program is used to prepare a quick text message for e-mailing. The Internet
addresses for up to 10 recipients should be coded in this API.
You may enter up to 1024 characters of text for the e-mail message. The text
will be broken up into 76 character lines at word breaks.

Mail member created (MAILMBR)


Define a CL variable (10 characters long) and code the variable name here. This
is a required parameter.
You may use this parameter to receive the name of the mail member that will be
created for this text message. You will need this name if you intend to add
attachments, using another API, to this mail before it is sent.
Note: If you intend to add one or more attachments to the mail before it is sent,
be sure to use *NO on the (SENDMBR) parameter, so that the message will not
be mailed before the next API has a chance to add the attachments.

To E-mail address (TOADDR)


You may code up to 10 different e-mail addresses for the recipients of the text
message, in any of the following formats:
• jdoe@somecompany.net
• <jdoe@somecompany.net>
• <jdoe@somecompany.net> (John Doe)
• "John Doe" <jdoe@somecompany.net>
• list-name
• list-file/list-name

Subject (SUBJECT)
A Subject field can be used to briefly describe the content of the e-mail message.

From E-mail address (FROMADDR)


You may code an address that will replace the From address that is normally
used for the Mailbox that this message will be prepared in. This is the address
that identifies who is sending the e-mail message, and where replies should be
sent. You may code *SAME to indicate that the program should use the From
address that is normally used for the Mailbox.

Text message (TEXT)


You may enter up to 1024 characters of text for the message. The text will be
broken into 76 character lines at word breaks.

152
6 API's

From mailbox (MAILBOX)


Enter the name of a valid mailbox that the e-mail messages will be sent from.
The mailbox supplies the Return address that is placed in the message. The user
running this program must have access to the specified mailbox.
You may leave the default value of *USER which will use the current user-id as
the mailbox.

Category (CATEGORY)
Enter the category that you wish to have the messages placed in. If you leave it
blank, it will default to 'Text Messages'.

Send the member to Out Box (SENDMBR)


The default value of *YES will send the new mail member to Out Box for
mailing on the next mail run. If you specify *NO the message will not be
mailed. This should only be used if you intend to add attachments to the
message before mailing.

Remove message after sending (RMVMSG)


This 4 character field defaults to *NO. Enter *YES if you would like the
program to set the Auto Purge field to "Y" in the messages. This will cause the
message to be automatically deleted after it is sent.

Priority (PRIORITY)
This field is used to mark how important a message is or how soon it should be
sent. (L=Low, N=Normal, H=High)

Delivery Status Notification (DSN)


This field is used to mark when you want the Internet SMTP servers to notify
you of the Delivery Status of this e-mail message. The default value of N
(Normal) will usually send you back a standard failure message, if the e-mail is
undeliverable.
You may enter F (Failures) which will cause a delivery status message to be
sent, if the message fails to be delivered.
If you enter S (Successes) the Internet will send back a delivery status message,
when it is successfully delivered, relayed to a server that does not have delivery
status capability, or when a list has been expanded by a list server.
You may enter B (Both) to have delivery status messages sent when it either
fails or is successfully delivered, relayed, or expanded.

153
6 API's

Request a Read Receipt (REQRR)


This field can be used to request a Read Receipt form the recipient of this piece
of mail. If the recipient allows it, a receipt will be sent back to the return
address, when the user opens their mail.

Reply-to Address (REPLYTO)


You may code an address that will be used for replies to this e-mail message.
You should code this address only if it is different than the From Address.

Sample Code
The following code creates a mail message, adds a physical file member as an
attachment, then mails it.

PGM

DCL VAR(&MEMBER) TYPE(*CHAR) LEN(10)


DCL VAR(&ERRMSG) TYPE(*CHAR) LEN(128)

KMLTXTM MAILMBR(&MEMBER) +
TOADDR('someone@home.com') +
SUBJECT('System failure message') +
TEXT('The system has failed to complete +
the weekend process.') +
MAILBOX(SYSTEM) SENDMBR(*NO) +
RMVMSG(*YES) PRIORITY(H)
MONMSG MSGID(CPF9898) EXEC(GOTO ERRORS)
KMLPFMA MAILMBR(&MEMBER) TOADDR(*SAME) +
SUBJECT(*SAME) FILENAME(yourfile) +
MEMBER(yourmbr) LIBRARY(yourlib) +
DESC('Your file description') +
ANUMBER(*LAST)
MONMSG MSGID(CPF9898) EXEC(GOTO ERRORS)
GOTO CMDLBL(EXIT)

ERRORS: RCVMSG MSGTYPE(*LAST) MSG(&ERRMSG)


SNDPGMMSG MSG(&ERRMSG) TOUSR(*SYSOPR)
EXIT: ENDPGM

154
6 API's

List KeyesMail Categories (LISTKMCAT)


This program will print a summary listing of all the mail that exists in the
KeyesMail system. It adds up the total number of members and their sizes by
Category. You may direct the listing to any printer and for any or all mailboxes.

Mailbox (MAILBOX)
Name the mailbox that you wish to be summarized. The default value of
*USER can be used to list your own mailbox. You may specify *ALL or
*EACH to list all the mailboxes. *EACH will list each of the mailboxes on a
separate page.
Note: A user may only list their own mailbox unless they have been given
specific access to another mailbox using the User Setup program. Only users
with a special authority of *SECADM may use the *ALL or *EACH values to
list all the mailboxes.

Printer device (PRINTER)


This is a 10 character field which specifies which printer that you wish to make
the listing on. The default value of *JOB will cause the listing to be printed on
the default printer for the current job.

Submit to Batch or Interactive (SUBMITJOB)


The default value of *BATCH will cause the program to be submitted to the
KMAIL job queue. If you specify *INTER the system will create the listing
interactively.

155
6 API's

Print a KeyesMail Member (PRTKML)


The print program can print the text part of an e-mail message to any printer
attached to your iSeries or AS/400 computer. You can start the print command
from a command line or an application.

Mailbox (MAILBOX)
Name the mailbox where the message exists.

Mail member (MAILMBR)


Name the message member that you wish to print.

Printer device (PRINTER)


This is a 10 character field which specifies which printer that you wish to use.
The default value of *JOB will cause the e-mail to be printed on the default
printer for the current job.

Inbound header (IHEADER)


Specify Y to print the inbound header information along with the e-mail
message. The default value of N will print the e-mail message only.

Number of copies (COPIES)


Specify the number of copies to be printed of the e-mail message. The default
value is 1.

156
6 API's

Purge KeyesMail (PURGEKML)


This program can be used to purge mail from the KeyesMail system. You may
specify the period ending date, the mailbox, the type of purge that you wish to
perform, the status of the mail that you wish to purge, and even the category if
desired.
Normally you will only want to purge inbound mail that has been opened,
answered, or forwarded, and outbound mail that has already been sent. But, you
can purge mail with other statuses.
Note: You must have the special authority of *SECADM to be able to specify
*ALL for the Mailbox parameter. This criteria can be changed by altering the
program called CHKKMS (Check KeyesMail Security) located in the source file
called QRPGSRC. For example, you could grant a specific user the ability to
purge mail for *ALL mailboxes.

Period ending date (PERIODEND)


All mail will be purged that was either sent or received on or before this date.
You may key any specific date in your normal date format, or use one of the
special values.
The default is a special value of *LASTMONTH. This can be used to purge
mail that is dated on or before this day last month.
*LASTWEEK will purge mail on or before this day last week. Also available is
*YESTERDAY and *TODAY.

Mailbox (MAILBOX)
The default value of *USER is used to purge your own mailbox. You may
specify another specific mailbox or *ALL may be used to purge mail from all
mailboxes. You must have *SECADM special authority to be able to specify
*ALL, or you must have been given specific authority by a user in order to
purge their mailbox.
Note: The purge program will not purge any mail from a mailbox that has its
Disable Purge Function parameter set to Y.

Type of purge (TYPE)


The default value of *REDUCE is used to reduce the size of the mail. Any
attachments and the ASCII version of the message will be removed from the
system, substantially reducing the amount of disk storage that the system uses.
Only the EBCDIC text portion of the mail will remain on the system.
You may specify *DELETE to delete the entire mail message including the
EBCDIC text portion.

Status to purge (STATUS)


The default value of *NORMAL will purge mail members with the following
statuses only: Answered, Deliverd, Expanded, Opened, Passed, *Reject,

157
6 API's

Relayed, Sent, or <blank>.


You may specify *ALL to purge all mail regardless of the status, or you may
name a specific status to purge. If you name a specific status, be sure to enclose
it in 'Quotes' and use the appropriate case (Upper or lower) for each character. It
is case sensitive.
For example: The value '*New' can be used to purge all unopened inbound mail.

Category to purge (CATEGORY)


The default value of *ALL will purge mail members from all of the categories.
You may name a specific category to purge. If you name a specific category, be
sure to enclose it in 'Quotes' and use the appropriate case (Upper and lower) for
each character. The selection is case sensitive.
For example: The value 'In Box' can be used to purge all mail from the In Box
category only.

Submit to Batch or Interactive (SUBMITJOB)


The default value of *BATCH will cause the program to be submitted to the
KMAIL job queue. If you specify *INTER the system will purge the mail
interactively.

158
7 Output Queue

7 Output Queue

The output queue called KMLOutQ can be monitored for spooled files that you
wish to e-mail. As a spooled file becomes Ready in this output queue, it will be
automatically processed into e-mail messages and/or attachments and mailed. A
second output queue called KMLOutH can be used for High Priority e-mails. If
you use this second output queue sparingly, it offers you a method of sending
important correspondence through the system in front of the regular e-mail
traffic that might be backed up in KMLOutQ.
After processing a spooled file, it will be removed from the output queue unless
you specify *YES on the Save spooled file attribute using an OVRPRTF
command.

Starting and Stopping KMLOutQ


You may start or stop the KMLOutQ Processing program either manually or
using commands:

Manually starting or stopping KMLOutQ Processing:


1. Select item 21 (KeyesMail Connections) from the KeyesMail menu.
2. Use F9 to start or F10 to end the processing program.

Using Commands:
The commands STRKMLOUTQ and ENDKMLOUTQ can be used to start and
stop KMLOutQ and KMLOutH Processing. You may wish to place
STRKMLOUTQ in your normal QSTRUP routine, so that it automatically starts
after an IPL. It is also recommended that you end the processing program
before and restart it after doing any backup of the KeyesMail data library.

Specifying E-mail Parameters


Addresses and other e-mail parameters can be specified using any or all of the
following techniques:
● The User Defined Data field of the spooled file attributes can be used to
specify E-mail commands for the entire spooled file.
● The program Work with KeyesMail Spooled Files can be used to specify e-
mail parameters for each of your spooled files.
● You can code E-mail commands within your spooled files to direct exactly
how each page should be e-mailed.
● An Exit program can be used to look up data within your own master files
and set any of the e-mail parameters for each page of your spooled files.
Each of these methods can be used separately or together to specify e-mail
parameters. The last method that you use, in the above order, will override any
previous values for that parameter.

159
7 Output Queue

Spooled File Attributes


Special parameters can be placed in the Front Side Overlay and the User
Defined Data fields of a spooled file, using an OVRPRTF command.

Front Side Overlay


You may code an overlay name in the Front Side Overlay field to have the
spooled file pages mapped onto a forms overlay. The Back Side Overlay can
also be used to specify a continuation form.

User Defined Data


These commands can be used to direct how and where a spooled file should be
e-mailed.

¬Comp compression-code
This command can be used to compress the data for e-mailing.
• 0 = No compression
• 1 = Fast compression with good compression amounts.
• 2 = Normal compression with better compression amounts at a reasonable
speed.
• 3 = Maximum compression that will take the longest time.

Notes: The filename extension will be changed to .ZIP for compressed


attachments. This option requires PKZIP software to be installed on your iSeries
and available on the library list.

¬Email recipient's-address
This command specifies the recipient's address. You can specify the name of a
mailbox, a department, an address list, or an Internet address for the recipient.

¬Encr encryption-code
Use this along with compression to password protect a file by encrypting the
data.
• 0 = No encryption
• 1 = ZipStd algorithm which is compatible with other standard encryption
products, such as GZIP.
• 2 = Zip Advanced Encryption Standard that uses a 128 bit key for Strong
Encryption.
Note: This option requires PKZIP software to be installed on your iSeries and
available on the library list.

160
7 Output Queue

¬From sender's-address
This command can be used to specify the sender's return address. If not
specified, the normal return address for the mailbox will be used.

¬MBox sender's-mailbox
This command specifies the sender's mailbox. The mail will be created and
mailed from that KeyesMail mailbox. If not given, the user that created the
spooled file will be considered the sender. If a mailbox does not exist for that
user's User-Id, the mailbox called POSTMASTER will be used. This command
will be ignored, if you specify a Template using the ¬Temp command, described
below.

¬Owner password
Use this to specify an owner password for PDF documents that are being
encrypted. An owner can do anything to a PDF document. The password can be
up to 32 characters in length and is case-sensitive.

¬Pass password
Use this to specify a password for files that are being encrypted. The password
can be up to 64 characters in length and is case-sensitive.
Note: There is no way to extract a password from an encrypted file. If the
password is forgotten, the file will become inaccessible.

¬Subj subject
This command specifies the subject of the e-mail message. If no subject is
specified, the system will use a generic subject.

¬Temp mail-member
This command specifies the name of a mail member that you wish to use as a
template for adding the spooled file as an attachment. See How to Create a
Template in the Appendix for more information.
You may specify the special value *MESSAGE instead of the name of a mail
member to cause the spooled file to be converted into the e-mail message instead
of an attachment. You may code *HTML if the spooled file contains HTML for
the message. The HTML that you send is not limited to text. It can contain
Images and website references, as long as those references are available to the
recipient.

¬Trans translation-code
This can be used to specify the type of translation for the spooled file.
• 0 = No translation (Only to another iSeries)
• 2 = ASCII text
• 3 = TIFF Image
• 4 = RTF (Rich Text Format)
• 5 = Map to Overlay (Requires the Front Side Overlay)
• 6 = PDF (Portable Document Format)

161
7 Output Queue

¬User password
Use this to specify a user password for PDF documents that are being encrypted.
A user can view a PDF and can optionally print and annotate a PDF. A user
cannot change a PDF document. The password can be up to 32 characters in
length and is case-sensitive.

162
7 Output Queue

Work with KeyesMail Spooled Files


E-mail parameters can be specified for each of your spooled files, using the
Work with KeyesMail Spooled Files program (shown below). This program can
be started from the KeyesMail menu (Item 34) or using the KMSPOOL
command.

WRKKSF Work with KeyesMail Spooled Files Date


user-id Time
Position to:

Options: 2=Change 3=Copy 4=Delete

Option Spooled File


___________ Enter new Spooled File here to add
_ FORMS
_ INVOICES
_ ORDERS

Bottom
F3=Exit F12=Cancel F17=Top F18=Bottom

You may add a new spooled file description by entering the spooled file name on
the top line.
Option 2 (Change) may be used to change existing spooled file descriptions.
Option 3 (Copy) may be used to copy a description to another name.
Option 4 (Delete) may be used to remove entries that are no longer needed.

163
7 Output Queue

Spooled File Setup Screens


When adding a new spooled file or selecting option 2 (Change) the following
screens are used to define the e-mail parameters desired:

WRKKSF Setup Screen Date


user-id Spooled File: INVOICES Time

Type choices, press Enter.


To address . . . . :
Template. . . . . . :
Subject . . . . . . . : Invoice #¬1 from XYZ
From address . . :
Mailbox . . . . . . : SALES
Translation . . . . : 5 0=None, 2=EtoA, 3=Img, 4=RTF, 5=Map, 6=PDF
Map Overlay . . : INVOICES
Exit Program . . : EXITPGM

Scan Field Locations:


Line Column Size Line Column Size
#1 7 68 5 #2
#3 #4
#5 #6
#7 #8
#9 #10

F3=Exit F12=Cancel More . . .

WRKKSF Message Screen Date


user-id Spooled File: INVOICES Time

Type choices, press Enter.

Message . . . . . : Attached you will find Invoice #¬1. If you have any questions please
contact your salesperson at (800) 555-1212.

You can use ¬n to substitute any of the Scan Field Values into the message.

F3=Exit F12=Cancel Bottom

164
7 Output Queue

To address
For spooled files that always go to the same recipient or list, you may code the
address here.

Template
This is the name of a mail member that you would like to use as a template for
adding the attachment. See How to Create a Template in the Appendix for more
information.
Leave this field blank if you will be keying a message on the Message Screen,
described on the following page.
You may specify the special value *MESSAGE in this field to cause the spooled
file to be converted into the e-mail message instead of an attachment. You may
code *HTML if the spooled file contains HTML for the message. The HTML
that you send is not limited to text. It can contain Images and website
references, as long as those references are available to the recipient.

Subject
This will be used as the subject of the e-mail message. If no subject is specified,
the system will use a generic subject for the message. This field may be coded
with substitution values ¬1 - ¬10, see Scan fields on the following page for
more information.

From address
This is the sender's return address. If not specified, the normal return address
from the sending mailbox will be used.

Mailbox
This specifies the sender's mailbox. The mail will be created and mailed from
that KeyesMail mailbox. If not given, the user that created the spooled file will
be considered the sender. If a mailbox does not exist for that user's User-Id, the
mailbox called POSTMASTER will be used. This parameter will be ignored, if
you specify a Template name.

Translation
This specifies how to translate the spooled file pages into an attachment.
• 0 = No translation (Only to another iSeries)
• 2 = ASCII text
• 3 = TIFF Image
• 4 = RTF (Rich Text Format)
• 5 = Map to Overlay (Requires the ¬Map command)
• 6 = PDF (Portable Document Format)

165
7 Output Queue

Map Overlay
This is used to map spooled file pages onto a forms overlay. The translation
code is automatically assumed to be 5 (Map) when you specify an overlay. The
overlay that you name, must exist as a member in the files KMLTEMP and
KMLMAP. See Mapping a Spooled File to an Overlay in the Appendix section
for more information.

Exit Program
An exit program can be used to look up addresses in your master files. All the e-
mail parameters and the Scan Field Values are sent to the exit program for each
page of the spooled file, as it is being processed. The exit program can add to or
change any of the e-mail parameters, as needed. The Scan Field Values can be
used by the exit program for chaining or substitution into other fields, such as the
Subject or Return address.
A sample exit program called EXITPGM can be found in the source file called
QRPGSRC in KMLIB. You may copy this source code to any other name, in
any library so that you can add your own custom code, to make your exit
programs.

Scan Field Locations


Key the line number, column number, and length for up to 10 different fields to
be extracted from each *SCS spooled file page. The values found at these
locations are passed to the exit program and can be used for chaining to your
master files. They can also be used for substitution into the Message or Subject
fields.
The Scan Field Locations can only be defined for standard *SCS printer files.
However, *USERASCII printer files can fill the same Scan Field Values using
special Email commands ¬S1 - ¬S10, embedded within the PCL data. See the
following pages for more information.

Message
Up to 1024 characters of text may be keyed to be used as the e-mail message.
The spooled file pages will be added as attachments to the message. You may
code ¬n (where n is the Scan Field number) within the message to substitute
Scan Field Values taken from each page of the spooled file.

166
7 Output Queue

E-mail Commands within Spooled Files


You may include e-mail and fax commands within your *SCS and *USERASCII
spooled files, to direct exactly how and where each of the pages should be e-
mailed or faxed. The commands can be coded anywhere on each of the spooled
file pages. The commands will be stripped out of the spooled files so that they
will not be included with the e-mailed documents.
If you do not code any commands on a page - that page is considered a
continuation of the previous page. Any individual commands that you do not
code on a page will assume the values from the previous page.
Note: Fax commands can only be used if you also have the KeyesFax libraries
on your library list. Each page can be sent as a fax or an e-mail or both.

Spooled File example:


The following example shows how e-mail commands can be coded in a spooled
file for an Order Confirmation with an overlay.

¬Email jsmith@abc.com ¬Map OrderForm


¬Email warehouse1@your-company.com
¬Subj Order acknowledgement
¬Temp M042112562 #OC1234

ABC Company
123 Address
Anytown, USA

15 Parts being ordered $25.00


5 Other parts ordered $16.00

Total $41.00

Notes: In this example, the top four print lines were used to specify e-mail
commands which give the destination addresses, the name of a forms overlay,
the subject to be used, and the name of a template to be used for the message that
goes with the attached document.
These e-mail commands will be stripped out of the spooled file before it is
mapped to the OrderForm overlay.

167
7 Output Queue

¬Comp compression-code
This command can be used to compress the data for e-mailing.
• 0 = No compression
• 1 = Fast compression with good compression amounts.
• 2 = Normal compression with better compression amounts at a
reasonable speed.
• 3 = Maximum compression that will take the longest time.

Notes: The filename extension will be changed to .ZIP for compressed


attachments. This option requires PKZIP software to be installed on your iSeries
and available on the library list.

¬Desc description
This command can be used to specify a description up to 30 characters long for
each of the attachments within the spooled file. If you code a filename extension
at the end of the description (a dot followed by 2 or 3 characters), the description
will be used as the attachment filename. This is used as the Page Description
when faxing.

¬Email recipient's-address
This command specifies the recipient's address. You may code up to 10
different recipients for each page. You can specify the name of a mailbox, a
department, an address list, or an Internet address for each of the recipients.

¬Encr encryption-code
Use this along with compression to password protect a file by encrypting the
data.
• 0 = No encryption
• 1 = ZipStd algorithm which is compatible with other standard encryption
products, such as GZIP.
• 2 = Advanced Encryption Standard that uses a 128 bit key for Strong
Encryption.
Note: This option requires PKZIP software to be installed on your iSeries and
available on the library list.

¬Fax # phone-number
This command can be used to fax the document through the KeyesFax system.
Only 1 fax number can be specified along with up to 9 e-mail addresses for the
same page. Other fax commands, described in the KeyesFax manual, can be
coded for any pages that will be faxed.

¬From sender's-address
This command can be used to specify the sender's return address. If not
specified, the normal return address from the sending mailbox will be used.

168
7 Output Queue

¬Map overlay-name
This command is used to map spooled file pages onto a forms overlay. The
translation code is automatically assumed to be 5 (Map) when you specify an
overlay. The overlay that you name, must exist as a member in the files
KMLTEMP and KMLMAP. See Mapping a Spooled File to an Overlay in the
Appendix section for more information.

¬MBox sender's-mailbox
This command specifies the sender's mailbox, where the mail will be created and
mailed from. If not given, the user that created the spooled file will be
considered the sender. If a mailbox does not exist for that user's User-Id, the
mailbox called POSTMASTER will be used. This command will be ignored if
you specify a Template name.

¬Msg embedded-mail-message
Up to 256 characters of text may be embedded in a *USERASCII spooled file,
to make up the mail message.

¬Owner password
Use this to specify an owner password for PDF documents that are being
encrypted. An owner can do anything to a PDF document. The password can be
up to 32 characters in length and is case-sensitive.

¬Pass password
Use this to specify a password for files that are being encrypted by PKZIP. The
password can be up to 64 characters in length and is case-sensitive.
Note: There is no way to extract a password from an encrypted file. If the
password is forgotten, the file will become inaccessible.

¬Subj subject
This command specifies the subject of the e-mail message. If no subject is
given, the system will create a generic subject.

¬Temp mail-member
This command specifies the name of a mail member that you wish to use as a
template for adding the attachment. See How to Create a Template in the
Appendix for more information.
Leave this field blank if you will be keying a message on the Message Screen,
described on the Spooled File Setup Screens.
You may specify the special value *MESSAGE in this field to cause the current
page to be converted into the e-mail message instead of an attachment. You may
code *HTML if the spooled file contains HTML for the message. The HTML
that you send is not limited to text. It can contain Images and website
references, as long as those references are available to the recipient. Further
pages for the same recipient addresses can then be sent as attachments to this
message page.

169
7 Output Queue

¬Trans translation-code
This command specifies what type of attachment that you would like the page
translated into:
• 0 = No translation (Only to another iSeries or AS/400)
• 2 = ASCII text
• 3 = TIFF Image
• 4 = RTF (Rich Text Format)
• 5 = Map to Overlay (Requires an overlay name)
• 6 = PDF (Portable Document Format)

Note: *USERASCII files can be translated using code 3 or 6 only.

¬S1 - ¬S10 substitution-value


These commands can be used to fill the 10 Scan Field Values, described
previously under the Spooled File Setup Screens. These fields can be used to
pass information to your exit programs or as substitution fields into the Subject
and Message fields. They are especially useful for passing information from
*USERASCII printer files.

¬User password
Use this to specify a user password for PDF documents that are being encrypted.
A user can view a PDF and can optionally print and annotate a PDF. A user
cannot change a PDF document. The password can be up to 32 characters in
length and is case-sensitive.

170
Appendix

Appendix

Rules for Creating Connection Scripts


Connection scripts are always used for AS/400 SLIP connections and rarely used
for PPP connections. The rules are as follows:
● Column 1 of each line in the connection script may contain a control
character. The control character specifies the action that should be taken by
the AS/400 system. Column 2 may be left blank.
• The AS/400 system ignores comment lines.
Comment lines either begin with an asterisk (*), or are completely
blank.
• Output lines to the remote system begin with an ampersand (&).
● The AS/400 system interprets any non-blank line that does not contain either
an "*" or an "&" control character, described above, as input from the remote
host.
● You can mix upper-case and lower-case in a line that contains expected input
from the remote host.
The AS/400 translates all input to upper-case before comparing the dialog
match text.
● Fields enclosed in parentheses () contain the keywords that describe an input
or an output operation.
You cannot define the keywords. However, you can control the operations
performed during the connection dialog. To control the operations and the
order in which they run, create a unique connection script using
appropriately placed keywords.

The valid keywords are:


(USERID) The AS/400 uses this keyword to pass the user ID to the
remote server for connection validation. If the remote system
requires both an account name and a user ID, configure both in
the Remote service access name parameter on the KMAILx
profile.
(PASSWORD) The AS/400 uses this keyword to send the password to the
remote server for connection validation.
(IPADDR) The AS/400 uses this keyword to exchange and activate the
AS/400's address.
(IPGATE) The AS/400 uses this keyword to exchange and activate the
ISP's address.
(PROMPT) Specifies that the AS/400 is to send a blank followed be a
carriage return and a line feed.
(WAIT) Causes the AS/400 to wait 1 second before resuming. You can
cause a delay from 1 to 99 seconds by entering (WAIT) 'xx'.
(xx is the delay in seconds.)

171
Appendix

Connection Script Example


You do not need to include all of the connection dialog in the connection script.
For input lines containing a keyword, it is good practice to include some text
preceding the keyword to help the AS/400 system locate the expected keyword
input.
1. * Generic dial-out connection script example
2. Username
3. & (USERID)
4. Password
5. & (PASSWORD)
6. Protocol
7. & slip
8. The gateway address is (IPGATE) Your address is (IPADDR)
After the modem dials and connects, the AS/400 reads the connection script.
Each line in the connection script causes the AS/400 to send or receive data as
follows:
1. Comment line, no action taken.
2. Waits to receive the prompt "Username" from the ISP.
3. Sends the contents of the user ID field.
4. Waits for the "Password" prompt from the ISP.
5. Sends the contents of the password field.
6. Waits for the "Protocol" prompt from the ISP.
7. Sends the word "slip" to the ISP, to start the SLIP protocol.
8. Receives the ISP's and the AS/400's IP addresses that are dynamically
assigned when the connection is made.
Note that the input match text contains the (IPADDR) and (IPGATE)
keywords. The keywords are located where the addresses will be received
from the ISP or server.

172
Appendix

Granting Authority to Start the KeyesMail System


A user must have the authority to the KMAIL user profile in order to start the
KeyesMail system. This can be easily granted, as follows:
1. Enter: WRKOBJ KMAIL
2. Select option 2 (Edit authority) for the object of type *USRPRF.
3. Press F6 (Add new users).
4. Add each user desired with the Object Authority of *USE.

173
Appendix

International Character Set


The following table shows the full international character set available to you
when sending e-mail messages.

174
Appendix

Restoring an iSeries or AS/400 Save File


Save files can only be used on another iSeries or AS/400. The KeyesMail
software will automatically convert a save file to and from an e-mail attachment
for you. You can send a save file as an attachment to a recipient that does not
have KeyesMail software. They may use the following instructions to place the
save file onto their iSeries:
1. Save the attachment to a PC disk.
2. Use CRTSAVF library/savefile-name on a command line to create a Save
File on your iSeries.
3. Use FTP to do a Binary transfer of the attachment data into the Save File.

175
Appendix

Mapping a Spooled File to an Overlay


The Rich Text Format method of creating an overlay has been deprecated. We
highly recommend that you use KeyesOverlay, as an alternative, to create PDF
documents, with overlays.
You can map spooled data onto an overlay to fill out a form and make it a full
color attachment to an e-mail message. The overlay can be either a PDF or a
Rich Text Format (RTF) document that will be merged with your spooled file
data. A PDF overlay will require the optional product called KeyesOverlay.
Instructions can be found in its manual.

Creating a Rich Text Overlay (Deprecated)


There are two different ways of mapping printer data to a Rich Text Overlay:
1. You can map existing printer output data to the overlay using a Mapping
Table.
2. You can create custom printer data where each of the print lines contain one
of the substitutable values to be mapped to the overlay.
Use any PC word processor that can create a Rich Text document, such as
MS Word™ or Lotus WordPro™. You will define substitutable fields within
the document. After creating the overlay (RTF document) on the PC, you must
upload this to the iSeries into a file called KMLTEMP in the KeyesMail Data
library (KMDATA), without translating it.

Substitutable fields:
Use a caret symbol (^) for each substitutable field that you want to be mapped
onto the overlay from the iSeries 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.

176
Appendix

Uploading the overlay to the iSeries:


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 iSeries' Shared Folders. Then
use the CPYFRMPCD command on the iSeries to transfer the Shared Folder file
to the KMLTEMP file, with *NONE for translation and *NOTEXT, selected.

Sample Rich Text (RTF) Overlay:


A sample RTF overlay will appear as follows:

The sample overlay INVOICE, shown above, is included in the KeyesMail Data
library (KMDATA) in the file KMLTEMP for your review.
Note: The first caret (^) defined, for the Invoice number, was created with a
larger font. One caret was then coded where each field is to be positioned, using
the desired font.
The carets are positioned on the page using single tabs and no spaces. Each
caret is replaced with fields of varying length from the iSeries spooled file. If
spaces or multiple tabs were used between carets, this would cause the fields not
to be aligned on the finished document.

177
Appendix

Mapping existing Printer Data


To map existing printer data to the overlay you will code mapping table entries
in a source file called KMLMAP in the KeyesMail Data library (KMDATA).
The member name must be the same name as the overlay. Each of the records
will contain the mapping entry for one of the substitutable fields. The fields are
taken from existing printer data that has been defined to print onto a preprinted
form.

Mapping table layout:


Each mapping entry consists of 4 values that describe where the substitutable
field can be found in the existing printer data.
Cols Value
• 1-3 Line number
• 4-6 Column number
• 7-9 Field length
• 11-50 Description (optional)

Existing printer data:


Assume that you have a normal spooled file containing printer data for a
preprinted invoice form, as shown below:

C12345

7/15/99 JOHN

ATTN: JOE CUSTOMER - SAME -


JC COMPANY
123 STREET
ANYTOWN, USA

VERBAL 7/15/99 Priority Air Mail 30 Day Trial Period

1 KeyesMail - Version 3.0 Software 3,000.00 3,000.00


2 Extra user's guides 25.00 50.00
1 Shipping & handling charges 5.00 5.00

Total Amount Due 3,055.00

178
Appendix

Sample Mapping table:


You would define mapping table entries for the invoice printer data, as shown
below:

07 68 06 Invoice number
10 55 08 Date
13 08 31 Attention (Ship to)
13 50 30 Attention (Sold to)
14 08 30 Company
14 50 30 Company
15 08 30 Address #1
15 50 30 Address #1
16 08 30 Address #2
16 50 30 Address #2
17 08 30 City, St Zip
17 50 30 City, St Zip
21 02 09 Order number
21 15 08 Date Shipped
21 27 15 Shipped Via
21 61 20 Terms
25 05 04 Qty #1
25 14 40 Desc
25 57 11 Unit Cost
25 70 11 Extended
26 05 04 Qty #2
26 14 40 Desc
26 57 11 Unit Cost
26 70 11 Extended
27 05 04 Qty #3
27 14 40 Desc
27 57 11 Unit Cost
27 70 11 Extended
28 05 04 Qty #4
28 14 40 Desc
28 57 11 Unit Cost
28 70 11 Extended
29 05 04 Qty #5
29 14 40 Desc
29 57 11 Unit Cost
29 70 11 Extended
30 05 04 Qty #6
30 14 40 Desc
30 57 11 Unit Cost
30 70 11 Extended
31 05 04 Qty #7
31 14 40 Desc
31 57 11 Unit Cost
31 70 11 Extended
37 70 11 Total Amount

Each record will correspond to one of the substitutable fields that you defined in
the overlay. All of the data from the Spooled file does not have to be mapped
onto the overlay. In the above example, the Salesman field "JOHN" has no table
entry because it does not appear on the overlay. Also the comment "Total
Amount Due" was coded as a constant on the overlay, therefore it was not coded
as a substitution field.

179
Appendix

Connecting the Overlay to the Printer Data:


You must place the name of the mapping entries (which is the same as the
overlay name) into the Spooled File Attributes, using an OVRPRTF command.
If there is only a single overlay, that is to be used for all the pages, code this in
the Front side overlay parameter. If you have a continuation overlay, you may
code this in the Back side overlay parameter. The second and all additional
pages will use the continuation overlay.

Creating Custom Printer Data


You can create custom printer data that does not require any mapping entries.
Custom printer data starts off with a command line that names the overlay,
followed by lines that contain each of the substitutable field values.
Line # 1 of the spooled file must contain the OVERLAY command, as shown
below:
OVERLAY: your-overlay-name

Substitution fields:
Each of the remaining lines of the spooled file will contain a single field value to
be mapped to the overlay. Each field should start in column 1, but can be right
adjusted for the length of the field. Blank lines will define blank values. All the
lines must fit within a single page of the spooled file. You must define the page
length long enough to contain all of the desired substitution fields. For example,
if there are 120 fields to be mapped to a form, you must define the page length at
least 121 lines per page.
Additional pages in the spooled file can contain continuation pages for the
document or additional documents. The additional pages can map to the same or
different templates. All pages processed will be placed in the same attachment.

180
Appendix

Sample Custom printer data:


Sample print lines to provide data for the Invoice overlay, are shown below:

OVERLAY: INVOICE
C12345
7/15/99
ATTN: JOE CUSTOMER
- SAME -
JC COMPANY

123 STREET

ANYTOWN, USA

VERBAL
7/15/99
Priority Air Mail
30 Day Trial Period
1
KeyesMail - Version 3.0 Software
3,000.00
3,000.00
2
Extra user's guides
25.00
50.00
1
Shipping & handling charges
5.00
5.00

3,055.00

181
Appendix

The Resulting Mapped Document


The resulting document after the mapping has completed can be in full color and
will appear as follows:

Note: Any PC user that receives the e-mail can simply click on the attachment
to open it up, with any RTF reader. They will be able to view and print the
document, as desired. MS Word, Lotus WordPro, and WordPerfect are all
examples of RTF readers.

182
Appendix

How to 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.
1. 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.
2. 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.
3. Press F6 to create a new message. KeyesMail will create a new message
and place you in the Recipient addresses window.
4. 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).
5. Type a generic subject that could be used each time you send the
attachments, such as: Weekly Sales Report
6. 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.
7. Move the cursor up to the Options> line and press Enter to open the
Options window.
8. 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.
9. Press F3 (Exit) when you are finished preparing the message.
10. 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.
11. Use option 7 to rename the template to any valid mail member name that
you would like.
12. Use item 31 User Setup from the menu and enter a 5 on the chosen mailbox
(Ex: POSTMASTER).
13. 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.

183
Appendix

Debugging an Exit Program


If you write Exit Programs, to be used with KMMENU item 34 (Work with
Spooled Files), you may need to debug one of the programs, during
development. This is not an easy task, since the Exit Program will always be
executed in Batch mode from a Job Queue. To perform this task, you will need
to manually run the CHKKMLOUTQ program, rather than letting it run
normally.
The following technique can be used for debugging your Exit Programs:
1. Start item 21 (KeyesMail Connections) from KMMENU. If the
KMLOUTQ process is in a RDY status (shown on the top of the screen),
use F10 to turn it OFF.
2. Create a test spooled file and place it in the KMLOUTQ output queue.
Ideally, it will only contain one or two pages, just enough to run a quick test
of your Exit Program.
3. Be sure that you have created an entry in item 34 (Work with Spooled Files)
using the correct spooled file name, and make sure that it has a reference to
your Exit Program.
4. Run the following command to allow the KMLOUTQ process program to
be tested:
CHGDTAARA DTAARA(KMDATA/KMDATA1 (711 3))
VALUE(TST)
5. Start the Debug program of your choice (STRDBG or STRISDB) and set
the location for a break point.
6. Start the processing of the spooled file using the command;
CHKKMLOUTQ:
This should call your Exit program Interactively, allowing you to debug it.
When you have finished debugging, you will have to use the System Request
option 2, to end the CHKKMLOUTQ program. Otherwise, this program has
been programmed to run forever, once started.

184
Appendix

Automatic Blind Copies


KeyesMail has the ability to automatically send blind copies to one or more
mailboxes, for all mail that originates or is sent from one of the KeyesMail
mailboxes. The Auto Blind Copies can be sent to any Internal or External
mailbox that is defined within KeyesMail. External mailboxes can point to
addresses anywhere on the Internet.
Note: This is intended to be used for copying messages that are sent from
specific mailboxes, for duplication or archival purposes . The recipients of the
original e-mail will not know that the mail was also duplicated to the Blind Copy
addresses, but the sender will know that this is being done.

Setting up Auto Blind Copies


A source physical file called AUTOBC should exist (or can be manually created)
in the KMDATA library. Create a member, in this source file, named after the
mailbox that you want to duplicate mail from. Enter one mailbox name, starting
in column 1, on each line.
For example, if you create a member called POSTMASTER (named after the
Postmaster mailbox), all mail sent from the POSTMASTER mailbox will be
duplicated to the mailboxes that you enter into this source member.
Following is an example of entries that you can place in a source member using
any editor, such as IBM's SEU:

Columns . . . : 1 80 Edit POSTMASTER


SEU==>
FMT ** ...+... 1 ...+... 2 ...+... 3 ...+... 4 ...+... 5 ...+... 6 ...+... 7 ...+... 8
*************** Beginning of data ***********************************
0001.00 John
0002.00 Support
****************** End of data **************************************

In this example, all mail sent from the POSTMASTER mailbox will be
duplicated to both the JOHN mailbox and the SUPPORT mailbox, using Blind
Copy addresses.

185
Appendix

Spam Filter vs Unsubscribe


Not all unwanted or unsolicited mail is actually spam. Spam, in this context, is
defined as unwanted or unsolicited mail that comes from sources that cannot be
identified and cannot be stopped.
Legitimate corporate advertisement e-mail, that is sent using an address list,
should give you a method of unsubscribing from their list. If you can
unsubscribe from their list, this is not considered spam. You should take the
time to unsubscribe from the legitimate lists, rather than spamming the e-mail.
The Spam Filter works by checking the senders address. If the address does not
contain portions of the sender's name, it will be considered spam. If the address
contains too many digits, it will also be considered spam. This was done
because it was recognized that many spammers use computer generated names
and addresses that do not match.
When you use the "S" option to send an e-mail to the *Spam category, the From
address will be saved in a Spam file. Mail from that address will be considered
spam from then on, for that mailbox. When you un-spam an e-mail, by moving
it out of the *Spam category, the From address will also be saved in the Spam
file. Mail from that address will no longer be considered spam, for that mailbox.
It is recommended that you do not send unwanted corporate advertising e-mail to
the *Spam category. You should use the Delete function instead. Spamming the
messages will tend to fill up the Spam file, needlessly, and the unwanted e-mail
messages will continue to be sent, slowing down the SMTP mail system for
everyone. You should attempt to remove yourself from address lists, if you no
longer want to receive mail from them.

186
Appendix

How to Create EBCDIC PCL Printer Data


KeyesMail conversion programs can convert PCL printer files into PDF
documents or TIFF images for e-mailing. PCL printer files can include:
• Scalable Fonts from 4 to 99 point
• Raster graphics
• GL/2 vector graphics
• Shading & cross-hatch patterns
• Pie charts
• Macros

We have supplied tools that will allow you to create PCL printer data directly
from your application programs in standard *SCS printer files. PCL and GL/2
vector graphics data contain escape sequences that all start with an ASCII Esc
character followed by standard ASCII characters (in most cases).
We have provided a program that automatically transforms standard EBCDIC
spool files into ASCII PCL. It will translate the EBCDIC negate character (¬)
into an ASCII Esc character, strip out blanks at the ends of each line, and add
Carriage Return/Line Feeds for each print line to the data. Using this technique
you should be able to print any type of PCL graphics, lines, boxes, shading
patterns, etc. using regular *SCS printer files. For example, the following line in
a printer file would print a line across the page:
¬*p212y0X¬*c2b3326a0P
You must specify the phrase "EBCDIC PCL" in either the Form Type or the
User Data field of a spooled file, for KeyesMail to be able to recognize that you
have created EBCDIC PCL.

187
Appendix

- - - - blank page - - - -

188
Index

Index

A
Account information (E-mail) 18
Adding cards (KeyesFile) 100
Adding lines to cards (KeyesFile) 100
ADDLIBLE 16
Address lists 41, 80
Addresses for connection 18
Addresses for Internet Servers 18
Addresses in cards (KeyesFile) 110
Addressing E-mail
Using address lists 41, 80
Using mailboxes 40, 47, 80
Using phonebook 57, 59, 80
Adjusting E-mail paragraphs 51, 84
AFPDS spooled files (converting) 94, 137
API's
Change KeyesMail Password 120
Change the Status of a Mail Member 124
Create a KeyesMail Message 121
Edit a KeyesMail Message 122, 144
List KeyesMail Categories 155
Mail a PC File as an Attachment 125
Mail a Physical File Member as an Attachment 128
Mail a Spool File as a Message 140
Mail a Spool File as an Attachment 135
Mail a Spool File with a Message 146
Mail a Text Message 152
Mail an Automatic Reply from a Template 123
Printing KeyesMail members 156
Purge KeyesMail 157
Save an Attachment to Disk 132
Attach> (Message Editor) 81
Attachments
API's 125, 128, 132, 135, 146
Compressing 126, 130, 138, 148
Defining 92
Displaying 65, 89
Encrypting 127, 130, 138, 149
Inbound 87
Outbound 91
PC files 92, 125, 132

189
Index

Physical files 93, 128, 132


Removing 89
Save files 95, 132
Saving 63, 87, 132
Sending 61
Source physical files 93, 128, 132
Spool files 93, 132, 135, 146
Unencrypting 133
Authority to address lists (editing) 41
Authority to start KeyesMail (granting) 173
Authorization lists (mailbox) 35
Auto Blind Copies 185
Auto Forward 33
Auto Purge after mailing 81
Auto purge mail threshold 34
Auto Reply (API) 123
Auto Reply member 34
AUTOBC file 185

B
BC (Blind copies) 60

C
Card headings (KeyesFile) 106
Category (KeyesMail) 70
Category listing 155
CC (Carbon copies) 60
Change KeyesMail Password (API) 120
Change the Status of a Mail Member (API) 124
Character set (KeyesMail) 174
Comma Separate Values (CSV) 93
Communication (KeyesMail) 28
Communication line for KeyesMail 17
Compress attachments 11, 62, 126, 130, 138, 148, 160, 168
Connecting a modem 17
Connecting to a network 21
Connection
Defining 19
PPP 25
Sample System Setup 20, 21
SLIP 23
Verifying 26

190
Index

Connection scripts
Creating 22
Example 172
Rules 171
Copying
Address lists 41
Card lines (KeyesFile) 105
Cards (KeyesFile) 55, 108
E-mail text lines 50, 84
KeyesFile members 113
Mailboxes (external) 40
Messages (KeyesMail) 73
CRTKMLCOM command 17
CRTKMLSBS command 16
CSV translation 93
Cursor positioning (KeyesMail) 67

D
Date (KeyesMail) 69
Debugging an Exit Program 184
Deleting
Address lists 41
Cards (KeyesFile) 107
E-mail lines 51, 84
E-mail messages 73, 124
KeyesFile members 113
Lines in cards (KeyesFile) 104
Mail purge delay 34
Removing mail from server 33
*Deleted category 34, 70, 124
Delivery Status Notification 81
Department 32
Description command 168
Dial profiles 23, 24, 25
DIALIGN connection scripts 22
Disable Purge Function 32, 157
Displaying attachments 89
Duplicating cards (KeyesFile) 108

E
E-mail
Account information 18

191
Index

Account with ISP 33


Address lists 41, 80
Addresses in cards (KeyesFile) 57, 80, 109
Addressing 40, 47, 80, 159, 160
Commands in spooled files 159, 167
Messages (creating & editing) 46, 121, 122, 144, 169
Parameters 159
Security 75
EBCDIC PCL 187
Editing
Address lists 42
Card headings (KeyesFile) 106
Cards (KeyesFile) 55
E-mail text 51, 84, 122, 144
Text in cards (KeyesFile) 104
Encrypt attachments 11, 62, 127, 130, 138, 149, 160, 168
encrypted PDF's 11
Encryption password 161, 169
ENDKM command 28
ENDKMLOUTQ command 159
ENDKMSRV command 37
Errors (Message Editor) 82
Excel (Importing data) 93
Exit program (Debugging) 184
Exit program (Processing spooled files) 166
Exporting data from KeyesFile 116

F
Failed connection (diagnosing cause) 27
Fax commands 167
Forms overlays (mapping spooled files) 94, 166, 169, 176
Forward mail automatically 33
From: (Message Editor) 80
Front side overlay 160
Function keys
KeyesFile 101, 104, 106
KeyesMail 75
Message Editor 79
Function> (Message Editor) 82

H
Headings for cards (KeyesFile) 106

192
Index

Holding E-mail 74
Hot spots (Message Editor) 78, 92, 93, 95
HTML (Sending the message as) 144, 161, 165, 169

I
Images (converting spooled files to) 94
Importing data into KeyesFile 115
Index line (KeyesFile) 54
Information Manager (KeyesFile) 52
Inserting
E-mail text 48, 84
Lines in cards (KeyesFile) 104
Installing
KeyesMail data library 14
KeyesMail program library 13, 14
Internet addresses 18, 20, 21
Internet Service Provider (ISP) 11
Introduction to KeyesMail 11
ISP (Internet Service Provider) 11
ISP connection information 18
ISP mail accounts 33

K
KeyesFile (launching E-mail from) 77
KeyesFile Information Manager 52
KeyesFile's screen 98
KeyesMail
Communication 28
Communications line 17
Connections (creating) 19
Data library 14
Granting authority to start 173
Installing 12
Introduction 11
License number 15
Mail runs 28
Program library 13, 14
Servers 37, 39
Starting & Stopping 28, 29
Subsystem 16
System setup 20
Updating an existing system 12, 14

193
Index

Users 30
Working with 67
Keying E-mail messages 47
KFLIB library 16
KM command 67
KMDATA library 14, 16
KMINSTALL command 14
KMLIB library 13, 14, 16
KMLICENSE command 15
KMLOutH for High Priority mailing 159
KMLOutQ output queue 159
KMSPOOL command 163
KMUPD command 13, 14

L
Leaving mail on the Server 43
Libraries
Data 14
Program 13
License number (KeyesMail) 15
Listing mail by categories 155

M
Mail notification 33, 35
Mail purge delay 34, 70
Mailbox
adding users 30
authorization list 35
external 40
KeyesMail 71
Mailing messages 51
Mapping spooled files to an overlay 94, 166, 169, 176
Max number of mail members 34
Max Sign-on attempts 34
Merging KeyesFile members 113
Message command 169
Message Editor
Launching from KeyesFile 77
Screen 46, 78
Starting and Stopping 77
MIME 11
Modem

194
Index

Connecting 17
Information 23
Initialization 23
Moving messages (KeyesMail) 74
multipart/alternative 135, 136, 145

N
Naming Conventions 36
Network connection 21
Notifying users (new mail) 33, 35

O
Opening E-mail 73
Options
KeyesMail 72
KeyesMail user defined 74
Message Editor 81
Out Box (status) 28, 51
Output queue processing (KMLOutH) 159
Output queue processing (KMLOutQ) 159
Overlays (creating) 176
Overlays (mapping) 94, 166, 169, 176
Owner Password 96, 138, 149

P
PB command 52
PC files (attachments) 91, 125, 132
PC mail clients 43
PC mail server 37
PCL (*USERASCII spool file translation) 94, 137
PDF Encryption 96
Personal mail accounts 33
Personal/Private messages (sensitivity) 81
Phonebook 52, 80, 97
Phonebook (starting and stopping) 97
Physical files (attachments) 93, 128, 132
PING command 26
PKUNZIP program 90
PKZIP compression & encryption 11, 16, 96
POP3 11, 37, 43

195
Index

Position to: (KeyesMail) 71


POSTMASTER 30, 36
PPP connections 22, 25
Printing
Cards in KeyesFile 111
E-mail messages (KeyesMail) 73
Lines from cards (KeyesFile) 110
Profiles (Dial) 23, 24, 25
PSAN column (KeyesMail) 69
Purging KeyesMail 34, 68, 70, 72, 73, 157

Q
QSTRUP routine 159
QTEMP library 16
QUSRLIBL system value 16

R
Read Receipts 33, 81, 144, 150, 154
Recipient addresses 60, 80, 152
Reducing size of E-mail 74
Removing mail from server 34
Renaming e-mail 73
Reply marks (>) 78
Reply to mail automatically 34
Reply-to address 81, 144, 150, 154
Restoring iSeries Save files 175
Restrict attachments 32
Restrict to local network 32
Return address (user) 31, 32, 45
Return receipt (delivery status notification) 81
Routing entries (E-mail) 36
RSTLIB command 13
RTF (Rich Text Format) 93, 94, 137, 165, 170

S
Save attachment as 87
Save files (attachments) 95
Save files (restoring) 175
Saving attachments 63
Scan Fields (Processing spooled files) 164, 166, 170

196
Index

Scrolling through cards (KeyesFile) 53, 101


Scrolling through lines in cards (KeyesFile) 104
SCS spooled files (converting or mapping) 94, 136, 165, 170
Searching for cards (KeyesFile) 54
Searching for text in cards (KeyesFile) 103
Security
Internet 11
KeyesFile 114
KeyesMail 75
Sending E-mail 51, 57, 77, 109
Sent (status) 51
Sent: (Message Editor) 80
Server names or addresses 18, 20, 21
Servers (KeyesMail) 38, 43
Setup
PC Mail Client 43
Server 39
System 20, 21
User 30, 45
Shared folders 11
Sign-on (maximum invalid attempts) 34
Signature text 34, 79
Size of E-mail messages 69
SLIP connections 22, 23
SMTP 11, 37, 43
Sort by: (KeyesMail) 70
Source Physical files (attachments) 93
Spam
Mail purge delay 34, 70, 74
Spam filter 34, 70, 186
Spam Filter vs Unsubscribe 186
Spammed mail 70
Spamming E-mail 74
un-Spam a message (how to) 70
*Spam category 34, 70, 74, 186
Spell checking 49, 85
Spooled files
Attachments 93, 132, 135, 146
Attributes 160
E-mail commands 167
Mapping to an overlay 94, 166, 169, 176
Saving (API) 132
Sent as messages (API) 140
Setup Screens (for e-mailing) 164
Translating (for e-mailing) 93, 136, 165, 170
Working with 163

197
Index

Starting a KeyesMail mail run 28


Starting KeyesMail output queue processing 159
Starting the KeyesMail servers 37
Status 68, 82
Status (changing) 72, 124
STRKM command 28
STRKMLOUTQ command 159
STRKMSRV command 37
STRTCP command 26
Subject (changing) 72
Subject (Message Editor) 81
Subject (Spooled file attribute) 161
Subsetted lists of cards (KeyesFile) 102
Substitution fields (Processing spooled files) 166, 170
Subsystem for KeyesMail 16

T
Tape (copying programs from) 13
TCP/IP
Application servers 11, 26
Ending Point-to-Point connection 27
Modem information 23
PPP Dial profile 25
SLIP Dial profile 23, 24
Starting 26
Starting Point-to-Point connection 26
Template
How to create 183
Parameter 125, 128, 135, 161, 165, 169
Threads of conversation 67, 72
To> (Message Editor) 80
Translating spooled files (for e-mailing) 93, 136, 165, 170
Tutorial 45

U
UnCompress attachments 90
Undeleting mail messages 70
UnEncrypt attachments 87, 89, 90, 133
Updating an existing KeyesMail system 12
Updating phonebook from E-mail 58
User defined data (Spooled file attribute) 160
User defined options (KeyesMail) 74

198
Index

User mailboxes 30
User Password 96, 138, 149
User return address 32
User setup 30, 31, 45
USERASCII spooled files (converting) 94, 137

V
V.24 ports 17
Verifying attachments 26
Viewing attachments 89

W
Web browser (configuring and using) 44
When Notify (delivery status) 81
Word wrapping (KeyesMail) 47, 82
WRKHDWRSC command 17

Z
Zip Compression & Encryption 96
ZIP extension 90, 96

199

You might also like