Setting up Your OS/400 to Send E-mail with Infoprint Server
Infoprint Server for iSeries (Program Number 5722–IP1) lets you convert a spooled file to PDF and send it as e-mail. In order to use this function, your OS/400 must be set up to send e-mail. These instructions are for users in an environment that meet all of these requirements:
v TCP/IP is configured.
v E-mail has not been set up before.
v You want to use the command line to configure your system for sending e-mail. v You want to send e-mail with Infoprint Server.
If you use iSeries Navigator or Operations Navigator, you can follow the steps in the iSeries Information Center athttp://www.as400.ibm.com/infocenterto set up your system to send e-mail. To find these instructions, go to Networking –> TCP/IP –> E-mail –> Configure e-mail.
This document contains instructions to set up your OS/400 to send e-mail. You can further customize your e-mail options by using other commands and parameters as desired. To receive e-mail on the OS/400 requires more configuration not given in this document. For more information about using OS/400 commands or about setting up e-mail, go to any of these:
v TheOS/400 online help: Gives detailed information about commands,
parameters, and values. To access the online help, press F1 from the command screen.
v TheiSeries Information Center: Contains information about commands, instructions to configure TCP/IP, and instructions to set up the OS/400 to send and receive e-mail.
v The RedbookAS/400 E-mail Capabilities, SG24-4703: Contains instructions to configure TCP/IP, instructions to set up the OS/400 to send and receive e-mail, and various other e-mail topics.
v SNA Distribution Services, SC41-5410-01: Contains information about using SNADS on the OS/400.
v Infoprint Server for iSeries: User’s Guide, G544-5775-01: Contains instructions about using Infoprint Server for iSeries, including instructions to send e-mail. v The RedbookIBMEserveriSeries Printing VI: Delivering the Output of
e-business, SG24-6250: Contains instructions about using Infoprint Server for iSeries, including instructions to send e-mail.
Overview
These are the steps required to set up your OS/400 to send e-mail with Infoprint Server 5.1 and higher. They are explained in “Detailed steps” on page 3. Enter the commands with the given parameters and values as shown in capital letters below. If you prefer, enter the command (such as CHGDSTA), then press F4 to be
prompted through the command. Pressing F11 toggles between the parameter keywords (such as SMTPRTE) and a list (sometimes partial) of acceptable values for that parameter.
1. Enter CHGDSTA SMTPRTE(INTERNET GATEWAY)
2. Enter ADDDIRE USRID(INTERNET GATEWAY) USRD(’Generic Internet user’) SYSNAME(INTERNET) PREFADR(NETUSRID *IBM ATCONTXT)
3. Enter CHGPOPA MSGSPLIT(*NOMAX) AUTOSTART(*YES)
A value for MAILROUTER is required only if you want to control what happens when a name and address cannot be resolved. The mail router name would typically be set up by the system administrator. Specify MAILROUTER(*NONE) if you are unsure.
5. Create user profiles for any users who want to send e-mail. We will create user JOEJ. Enter:
CRTUSRPRF USRPRF(JOEJ) PASSWORD(not2bad) TEXT(’Joe Johnson’)
6. Add users to the system distribution directory. The value for USER must be the same as the value for USRPRF specified in step 5. ISERIES is the system name of the iSeries that Joe works on. Enter:
ADDDIRE USRID(JOEJ ISERIES) USRD(’Joe Johnson’) USER(JOEJ)
7. Note:Only complete this step if you want to use an SMTP server to send e-mail with Infoprint Server. You cannot specify an SMTP server with Infoprint Server 5.1. This step requires *SECADM special authority.
Add an SMTP address for the users in the system distribution directory. a. To add an SMTP address for the user ID JOEJ, enterWRKDIREand press
Enter.
b. Choose option 2 (Change) by the user ID you want to change and press Enter.
c. Press F19 (Add name for SMTP). If there is no SMTP address associated with this ID, a message appears on the bottom of the screen. Press Enter. d. Specify either the SMTP user ID and domain or the SMTP route. We
specify the user ID and domain of Joe’s Internet e-mail address: [email protected].
Add Name for SMTP
System: ISERIES Type choices, press Enter.
User ID . . . : JOEJ Address . . . : ISERIES
SMTP user ID . . . . JOEJ
SMTP domain . . . . SUPERSUNSEEDS.COM
SMTP route . . . .
F3=Exit F4=Prompt F12=Cancel
8. Enter ENDTCPSVR SERVER(*SMTP) 9. Enter STRTCPSVR SERVER(*SMTP)
You can now test the new e-mail setup by using the SNDDST command. We suggest you do this before testing Infoprint Server for the first time.
10. Test the e-mail setup by entering this command. You can use the TOUSRID or TOINTNET parameters or both:
SNDDST TYPE(*LMSG) TOUSRID((user address)) TOINTNET(([email protected])) DSTD(’E-mail’) LONGMSG(’This is a test to determine whether my new e-mail setup works.’) SUBJECT(’E-mail test’)
11. Go to your Internet mail system or OS/400 to see if you have received the message. For instructions about using SNADS to receive e-mail on your OS/400, refer to the iSeries Information Center.
Detailed steps
Follow these steps to set up your system to send e-mail with Infoprint Server 5.1 and higher. All of the steps except step 7 are required for any installation. If you want to use an SMTP server with a release of Infoprint Server later than 5.1, all steps (including step 7) are required.
1. Specify the user ID and address that the mail services will use to route mail that has an internet address as recipients.
This is not the ID of an actual person. For this example, we use INTERNET as the user ID and GATEWAY for the address. We will create a directory entry with this user ID and address in step 2. On the command line, enter:
CHGDSTA SMTPRTE(INTERNET GATEWAY)
To enter the values from the display, enterCHGDSTAand press F4, then fill in the values shown in bold on the screen below:
Change Distribution Attributes (CHGDSTA) Type choices, press Enter.
Keep recipients . . . *BCC *SAME, *BCC, *ALL, *NONE Use MSF for local . . . *NO *SAME, *NO, *YES Route to SMTP gateway:
User ID . . . . INTERNET Character value, *SAME, *NONE Address . . . . GATEWAY Character value
Bottom F3=Exit F4=Prompt F5=Refresh F12=Cancel F13=How to use this display F24=More keys
Route to SMTP gateway (SMTPRTE)
Specify the special user ID and address that the mail services will use to route mail that has internet addresses as recipients.
2. Create a directory entry that the mail services will use to route mail that has an internet address as recipients.
User ID and Address must be the same values you specified for User ID and Address in step 1. On the command line, enter:
ADDDIRE USRID(INTERNET GATEWAY) USRD(’Generic Internet user’) SYSNAME(INTERNET) PREFADR(NETUSRID *IBM ATCONTXT)
Alternatively, enterADDDIRE and press F4, then fill in the values shown in bold on the screens below. Press F10 and scroll down to display Preferred address:
Add Directory Entry (ADDDIRE) Type choices, press Enter.
User identifier:
User ID . . . . INTERNET Character value Address . . . . GATEWAY Character value User description . . . . ’Generic Internet user’ User profile . . . Name, *NONE System name:
System name . . . . INTERNET Character value, *LCL, *PC... System group . . . Character value
Network user ID . . . *USRID Last name . . . *NONE First name . . . *NONE Middle name . . . *NONE Preferred name . . . *NONE
More... F3=Exit F4=Prompt F5=Refresh F10=Additional parameters F12=Cancel F13=How to use this display F24=More keys
Add Directory Entry (ADDDIRE) Type choices, press Enter.
Preferred address:
Field name . . . . NETUSRID Character value, *USRID... Product ID . . . . *IBM Character value, *NONE Address type . . . . ATCONTXT Character value cc:Mail address . . . *NONE
cc:Mail comment . . . *NONE
Allow synchronization . . . *YES *YES, *NO DLO owner . . . *USRPRF *USRPRF, *GRPPRF
Bottom F3=Exit F4=Prompt F5=Refresh F12=Cancel F13=How to use this display F24=More keys
User ID (USRID)
Specifies the user ID and address. They must be the same values you specified for User ID and Address in step 1.
User description (USRD)
Describes this user ID.
System name (SYSNAME)
Specifies the one- or two-part name of the system on which the user works. For this special user ID, the system name does not have to be the name of an actual system.
Preferred address (PREFADR)
Specifies the preferred address for a user. This tells the mail server framework what fields to use in the system distribution directory for the preferred address of a user. For this special user ID, field-name must be NETUSRID, the product ID must be *IBM, and the address-type must be ATCONTXT.
3. Specify that outgoing e-mail messages are not split apart and specify that the POP mail servers are started when TCP/IP is started. On the command line, enter:
CHGPOPA MSGSPLIT(*NOMAX) AUTOSTART(*YES)
To enter the values from the display, enterCHGPOPAand press F4, then fill in the values shown in bold on the screen below:
Change POP Server Attributes (CHGPOPA) Type choices, press Enter.
Autostart servers . . . . *YES *YES, *NO, *SAME Number of initial servers . . . 3 1-20, *SAME, *DFT
Inactivity timeout . . . 600 10-65535 seconds, *SAME, *DFT Message split size . . . . *NOMAX 32-2048 kilobytes, *SAME... MIME CCSID:
Coded character set identifier 00819 *SAME, *DFT, 00819, 00912... When to use . . . *BESTFIT *SAME, *BESTFIT, *ALWAYS Allow standard POP connection . *YES *SAME, *YES, *NO
Host server connection . . . *NONE *SAME, *NONE, *ALL, *IP... + for more values
Address book:
Enabled . . . *NO *SAME, *NO, *YES Refresh interval . . . 1-65535 minutes, *NONE
Bottom F3=Exit F4=Prompt F5=Refresh F12=Cancel F13=How to use this display F24=More keys
Autostart servers (AUTOSTART)
Specifies whether to automatically start the POP mail server when TCP/IP is started by the STRTCP command or STRTCPSVR SERVER(*AUTOSTART) command.
Message split size (MSGSPLIT)
Specifies the number of kilobytes to use for partial message blocks when the mail message exceeds this count. Many mail servers cannot put split messages back together correctly. MSGSPLIT(*NOMAX) specifies that messages are never split.
4. Configure the SMTP server to specify that it is started when TCP/IP is started and to specify the mailrouter to use to get through the Firewall, if you have one. On the command line, enter:
CHGSMTPA AUTOSTART(*YES) MAILROUTER(’mailrouter’) FIREWALL(*YES)
If you exchange e-mail with Domino servers, specify *NO for Percent routing character (PCTRTGCHR) along with the parameters listed above. To enter the values from the display, enterCHGSMTPAand press F4, then fill in the values shown in bold on the screens below:
Change SMTP Attributes (CHGSMTPA) Type choices, press Enter.
Autostart server . . . . *YES *YES, *NO, *SAME Retries by minute:
Number of retries . . . 3 0-99, *SAME, *DFT Time interval . . . 30 0-99, *SAME, *DFT Retries by day:
Number of retries . . . 0 0-9, *SAME, *DFT Time interval . . . 0 0-9, *SAME, *DFT Retries by hour:
Number of retries . . . 0 0-99, *SAME, *DFT Time interval . . . 0 0-99, *SAME, *DFT Retry remote name server . . . . *NO *YES, *NO, *SAME Automatic registration . . . *NO *NO, *YES, *SAME User ID prefix . . . *DFT Name, *SAME, *DFT Address . . . *DFT Name, *SAME, *DFT
System name . . . *DFT Character value, *SAME, *DFT Alias table type . . . *SYSTEM *SAME, *SYSTEM, *PERSONAL
More... F3=Exit F4=Prompt F5=Refresh F12=Cancel F13=How to use this display F24=More keys
Change SMTP Attributes (CHGSMTPA) Type choices, press Enter.
User ID delimiter . . . ’?’ *SAME, *DFT, ?, =, ., &, $... Mail router . . . . ’mailrouter’
Coded character set identifier 00819 1-65533, *SAME, *DFT Mapping tables:
Outgoing EBCDIC/ASCII table . *CCSID Name, *SAME, *CCSID, *DFT Library . . . Name, *LIBL, *CURLIB Incoming ASCII/EBCDIC table . *CCSID Name, *SAME, *CCSID, *DFT
Library . . . Name, *LIBL, *CURLIB Firewall . . . . *YES *YES, *NO, *SAME Journal . . . *NO *YES, *NO, *SAME Process all mail through MSF . . *NO *YES, *NO, *SAME Percent routing character . . . *YES *YES, *NO, *SAME
More... F3=Exit F4=Prompt F5=Refresh F12=Cancel F13=How to use this display F24=More keys
Autostart server (AUTOSTART)
Specifies whether to start the SMTP server automatically when TCP/IP is started by the Start TCP/IP (STRTCP) command or STRTCPSVR SERVER(*AUTOSTART) command.
Mail router (MAILROUTER)
Specifies that a mail router is used when SMTP cannot find the name and address of the recipient in the system or personal alias tables or when SMTP cannot resolve the address of the recipient. A value for MAILROUTER is required only if you want to control what happens when a name and address cannot be resolved. The mail router name would typically be set up by the system administrator. Specify
MAILROUTER(*NONE) if you are unsure.
Firewall (FIREWALL)
Specifies whether outbound mail destined for a host in a remote domain is forwarded to the mail router to get through the network’s Firewall.
Percent routing character (PCTRTGCHR)
Specifies whether the percent sign (%) is interpreted as a routing character. Specify *NO if you exchange e-mail with Domino servers.
5. Create user profiles for any users who want to send e-mail. We will create user JOEJ and give him a password of″not2bad″Enter this on the command line:
CRTUSRPRF USRPRF(JOEJ) PASSWORD(not2bad) TEXT(’Joe Johnson’)
If the user is only allowed to sign on to the OS/400 to receive e-mail, specify INLMNU(*SIGNOFF)along with the values specified above. To enter the values from the display, enterCRTUSRPRFand press F4, then fill in the values shown in bold on the screen below:
Create User Profile (CRTUSRPRF) Type choices, press Enter.
User profile . . . . JOEJ Name
User password . . . . not2bad Character value, *USRPRF... Set password to expired . . . . *NO *NO, *YES
Status . . . *ENABLED *ENABLED, *DISABLED User class . . . *USER *USER, *SYSOPR, *PGMR... Assistance level . . . *SYSVAL *SYSVAL, *BASIC, *INTERMED... Current library . . . *CRTDFT Name, *CRTDFT
Initial program to call . . . . *NONE Name, *NONE
Library . . . Name, *LIBL, *CURLIB Initial menu . . . MAIN Name, *SIGNOFF
Library . . . *LIBL Name, *LIBL, *CURLIB Limit capabilities . . . *NO *NO, *PARTIAL, *YES Text ’description’ . . . . ’Joe Johnson’
Bottom F3=Exit F4=Prompt F5=Refresh F10=Additional parameters F12=Cancel F13=How to use this display F24=More keys
User profile (USRPRF)
Specifies the name (user ID) assigned to this user profile. This ID will be added to the system distribution directory in step 6.
User password (PASSWORD)
Specifies the password that lets the user sign on the system. The user should change this password after logging on.
Initial menu (INLMNU)
Specifies the name of the menu that is shown when the user signs on. *SIGNOFF specifies that the user is signed off the system after the initial program is completed. Only specify this value for a user that is only allowed to access the iSeries to retrieve e-mail.
6. Add users to the system distribution directory.
Any user specified as the sender of the e-mail must be registered in this directory. The value for USER must be the same as the value for USRPRF specified in step 5. ISERIES is the system name of the iSeries that Joe works on, we use that for the address. Add JOEJ to the directory by entering this command:
To use the panels instead of the command line, enterADDDIRE and press F4, then fill in the values shown in bold on the screen below:
Add Directory Entry (ADDDIRE) Type choices, press Enter.
User identifier:
User ID . . . . JOEJ Character value Address . . . . ISERIES Character value User description . . . . ’Joe Johnson’
User profile . . . . JOEJ Name, *NONE System name:
System name . . . *LCL Character value, *LCL, *PC... System group . . . Character value
Network user ID . . . *USRID Last name . . . *NONE First name . . . *NONE Middle name . . . *NONE Preferred name . . . *NONE
More... F3=Exit F4=Prompt F5=Refresh F10=Additional parameters F12=Cancel F13=How to use this display F24=More keys
User identifier (USERID)
Specifies the user ID and address for the user. User ID is usually the same value as the user specified in the user profile. Address is typically the last name of the user or the name of a group of users, such as a system name. We use the system name in this example.
User description (USRD)
Describes this user ID.
User profile (USER)
User profile must be the same as the user profile (USRPRF) specified in step 5.
7. Only complete this step if you are going to use a release of Infoprint Server higher than 5.1 and an SMTP server instead of SNDDST to send the e-mail. Add an SMTP address for the user ID added to the system distribution directory in step 6.
You need to be the system administrator (special authority *SECADM) to complete this step.
a. To add an SMTP address for the user ID JOEJ, enter WRKDIRE and press Enter.
Work with Directory Entries Type options, press Enter.
1=Add 2=Change 4=Remove 5=Display details 6=Print details 7=Rename 8=Assign different ID to description 9=Add another description Opt User ID Address Description
AMYE ISERIES Amy Evers BECKYJ ISERIES Becky Johnston BRIANR ISERIES Brian Reynolds BRUCEB ISERIES Bruce Baily CHARLENE ISERIES Charlene Stevenson DAVIDM ISERIES David Meyer DAVIDR ISERIES David Ried DIANEF ISERIES Diane Follette FRANKT ISERIES Frank Tilmore FRITAS ISERIES Frita Smith JUDYP ISERIES Judy Peterson
2 JOEJ ISERIES Joe Johnson
More... F3=Exit F5=Refresh F9=Work with nicknames F11=Sort by description F12=Cancel F13=Work with departments F17=Position to F24=More keys
c. The directory entry is shown. Note option F19 (Change name for SMTP):
Change Directory Entry User ID/Address . . . . : JOEJ ISERIES Type changes, press Enter.
Description . . . Joe Johnson
System name/Group . . . ISERIES F4 for list User profile . . . JOEJ F4 for list Network user ID . . . . JOEJ ISERIES
Name: Last . . . . First . . . . Middle . . . . Preferred . . . . Full . . . . More... F3=Exit F4=Prompt F5=Refresh F12=Cancel F18=Display location details F19=Change name for SMTP F22=Remove name for SMTP
d. Press F19. If there is no SMTP address associated with this ID, a message appears on the bottom of the screen. Press Enter:
Change Directory Entry User ID/Address . . . . : JOEJ ISERIES Type changes, press Enter.
Description . . . Joe Johnson
System name/Group . . . ISERIES F4 for list User profile . . . JOEJ F4 for list Network user ID . . . . JOEJ ISERIES
Name: Last . . . . First . . . . Middle . . . . Preferred . . . . Full . . . . More... F3=Exit F4=Prompt F5=Refresh F12=Cancel F18=Display location details F19=Change name for SMTP F22=Remove name for SMTP
User ID/address does not exist in SMTP table. Press Enter to add, F12 to ...
e. Specify either the SMTP user ID and domain or the SMTP route. We specify the user ID and domain of Joe’s Internet e-mail address: [email protected].
Add Name for SMTP
System: ISERIES Type choices, press Enter.
User ID . . . : JOEJ Address . . . : ISERIES
SMTP user ID . . . . JOEJ
SMTP domain . . . . SUPERSUNSEEDS.COM
SMTP route . . . .
F3=Exit F4=Prompt F12=Cancel
8. Stop the SMTP server. Enter this command on the command line:
ENDTCPSVR SERVER(*SMTP)
9. Start the SMTP server. Enter this command on the command line:
STRTCPSVR SERVER(*SMTP)
You can now test the new e-mail setup by using the SNDDST command. We suggest you do this before testing Infoprint Server.
10. Test the e-mail setup by entering this command. You can use the TOUSRID or TOINTNET parameters or both:
SNDDST TYPE(*LMSG) TOUSRID((user address)) TOINTNET(([email protected])) DSTD(’E-mail’) LONGMSG(’This is a test to determine whether my new e-mail setup works.’) SUBJECT(’E-mail test’)
To use the panels instead of the command line, enterSNDDSTand press F4, then fill in the values shown in bold on the screens below. To display the appropriate parameters, specify *LMSG then press enter.
Send Distribution (SNDDST) Type choices, press Enter.
Information to be sent . . . > *LMSG *MSG, *DOC, *FILE, *IDP... Recipient:
User ID . . . . QUEEN Character value Address . . . . ISERIES Character value Recipient type . . . *PRI *PRI, *CC, *BCC
+ for more values Internet Recipient:
Internet address . . . . [email protected]
Recipient type . . . *PRI *PRI, *CC, *BCC + for more values
Description . . . . E-mail
More... F3=Exit F4=Prompt F5=Refresh F10=Additional parameters F12=Cancel F13=How to use this display F24=More keys
Send Distribution (SNDDST) Type choices, press Enter.
Message . . . *NONE
Long Message . . . . This is a test to determine whether my new e -mail setup works.
... Confirmation of delivery . . . . *NO *NO, *YES
Sensitivity . . . *NONE
Content importance . . . *NORMAL *NORMAL, *LOW, *HIGH Priority . . . *NORMAL *NORMAL, *HIGH, *LOW
More... F3=Exit F4=Prompt F5=Refresh F10=Additional parameters F12=Cancel F13=How to use this display F24=More keys
Send Distribution (SNDDST) Type choices, press Enter.
Subject . . . . E-mail test + for more values
Document date . . . *NONE Date, *NONE, *CURRENT File cabinet location . . . *NONE
Copy list . . . *NONE + for more values
Expiration date . . . *NONE Date, *NONE
Creation date . . . *NONE Date, *NONE, *CURRENT Reference . . . *NONE
Action due date . . . *NONE Date, *NONE, *CURRENT More... F3=Exit F4=Prompt F5=Refresh F10=Additional parameters F12=Cancel F13=How to use this display F24=More keys
Information to be sent (TYPE)
Specifies the type of information that is sent and the parameters that are valid on this command. When you specify *LMSG, the text
specified on the Long Message prompt (LONGMSG parameter) is sent as an final-form text document. To specify a subject and an Internet e-mail address, you must specify *LMSG.
Recipient (TOUSRID)
Specifies one of the following:
v The user ID and address of zero or more users to whom the distribution is being sent
v The distribution list name of zero or more distribution lists containing the user ID and address of one or more users to whom the
distribution is being sent
Specify a value for TOUSRID, TOINTNET, or both.
Internet Recipient (TOINTNET)
Lets you specify an Internet e-mail address, such as
[email protected]. Specify a value for TOUSRID, TOINTNET, or both.
Description (DSTD)
Describes the distribution. This parameter is required.
Long Message
This text, up to 5000 characters (about a page), is sent to the recipients. The text is put into a final-form text document (FFTDCA) and sent as a note.
Subject
Specifies the subject of the e-mail.
11. Go to your Internet mail system or OS/400 to see if you have received the message. For instructions about using SNADS to receive e-mail on your OS/400, refer to the iSeries Information Center.