POP/400 Operating Instructions - Support

POP/400 Operating Instructions

From Support

Jump to: navigation, search

This instruction guide is to serve as a quick-start for using the POP/400 software.

Contents

Software Overview

Quickly and easily retrieve POP3 emil messages via the AS/400

Desc: POP/400 is an email API product that allows AS/400 applications to retrieve email messages from any POP3 mail box and process the returned messages. POP/400 is a great way to help implement applications such as web form processing, simple order entry, customer order status inquiry or any other application that be handled via a web form. Simply retrieve each email message and process the message with an RPG or COBOL program.

Highlights: · Can retrieve email messages from any POP3 email system. · Can leave messages on mail server or delete after processing. · Entire POP3 mail session can be logged. · Messages are stored in standard AS/400 file members. · RPG or COBOL programs can process messages. · Message fields can be parsed and written to AS/400 files. · Exit program can be called after each message has been retrieved. · Exit program can be called after all messages have been retrieved. · All API calls are CL commands.

Installing the AS/400 Library

Restore the POP/400 AS/400 library (RJSPOP3) via the instructions in the README.TXT provided with the POP/400 library download or via the CDINST.HTM page on the RJS CD.

Entering the AS/400 Access Code

Enter the AS/400 access code using the instructions provided with the access code or go to the RJSPOP3 menu and use menu option 1.

Getting to the Menu

ADDLIBLE RJSPOP3 GO RJSPOP3

POP/400 Menu

 Initial Setup                                            
    1. Enter POP/400 License Code                         
                                                          
 POP Commands                                             
   10. Retrieve POP3 Email Messages - POPGET              
   11. Display POP3 Messages - POPDSP                     
   12. Retrieve POP3 Message Count - POPCOUNT             
   13. Submit POP/400 Mail Monitor  - POPMON              
                                                          
 POP3 Troubleshooting Commands                            
   20. Ping Remote POP3 Server                            
   21. Connect to POP3 Server via Telnet                  
   22. AS/400 TCP/IP Configuration Menu                   
                                                       

General Processing Steps

A POP3 mail retrieval scenario will usually consist of the following steps:

· A POP3 mailbox on any POP3 server will be set up to receive messages. · The POPMON or POPGET commands will be used to periodically retrieve the messages to the AS/400. · An RPG or COBOL program will most likely be used to read the retrieved messages and extract data values from the messages. · The message members are then deleted or retained for archival purposes.

Running POP3 Email Retrieval Interactively - POPGET

This command can be run to retrieve POP3 email messages interactive or as part of a batch job. The POPMON POP3 monitor command calls the POPGET command to retrieve messages.

Run the POPGET command (menu option 10) and fill in the appropriate prompts:

POPGET parameters

Output file to hold messages - This parameter defaults to the POPMSG file in library RJSPOP3. Each retrieved message will be placed in a message file member.

POP3 Server IP Address - Enter the POP3 server IP address. Note: We will be adding DNS support very soon, so host names can be used.

POP3 User - Enter the POP3 mailbox user ID. This parameter is case sensitive and single quotes should be entered in the field is mixed or lower case values are entered.

POP3 Password - Enter the POP3 mailbox password. This parameter is case sensitive and single quotes should be entered in the field is mixed or lower case values are entered.

Download message headers into the POP3 session log - This setting should normally be set to *NO. Enter *YES if you want to download the POP3 message headers. This will download a portion of each message and place the header into the message log.

Download messages - This setting should normally be set to *YES. If this option is set to *YES, the messages will be downloaded.

Delete messages after download - This setting should be set to *YES if you want to empty the POP3 mailbox after messages have been retrieved.

Log entire POP3 session - This setting should normally be set to *NO. If you want one large file member created that contains the entire POP3 session for processing, set this option to *YES.

Display POP3 session log file - This setting should normally be set to *NO. If you want to display the POP3 session log after processing, set the value to *YES. This is nice for debugging problems.

Print POP3 session log file - This setting should normally be set to *NO. If you want to print the POP3 session log after processing, set the value to *YES. This is nice for debugging problems.

Exit program to process msg - Enter an exit program name that will be used to process each message as it's retrieved. There is a sample exit program POPEXIT1C in the source file SOURCE in library RJSPOP3.

End of process exit program - Enter an exit program name that will be called after all messages have been retrieved. There is a sample exit program POPEXIT2C in the source file SOURCE in library RJSPOP3.

Press Enter to run the POPGET command to retrieve messages from the POP3 mailbox.

After downloading email messages, you can use the POPDSP command to display the messages.

Display POP3 Messages - POPDSP

This option is used to display the email messages after they have been retrieved.

Run the POPDSP command (menu option 11) and fill in the appropriate prompts:

POPDSP parameters

File/Library name - Enter the message file to display. This parameter defaults to the POPMSG file in library RJSPOP3. Each retrieved message is stored in a message file member.

Press Enter to run the POPDSP command to display retrieved email messages.


Getting Current POP3 Message Count API - POPCOUNT

This command can be run in a CL program to retrieve the current number of messages in a POP3 mailbox. This is useful when you only want to run email retrieval processing if messages are found in the mailbox. This command is also used by the POPMON POP3 monitor command

Run the POPCOUNT command (menu option 12) and fill in the appropriate prompts:

POPCOUNT parameters

POP3 Server IP Address - Enter the POP3 server IP address. Note: We will be adding DNS support very soon, so host names can be used.

POP3 User - Enter the POP3 mailbox user ID. This parameter is case sensitive and single quotes should be entered in the field is mixed or lower case values are entered.

POP3 Password - Enter the POP3 mailbox password. This parameter is case sensitive and single quotes should be entered in the field is mixed or lower case values are entered.

Return message count - This nine digit numeric value will contain the retrieved message count.

POPCOUNT can only be called from within a CL or RPG program. There is a sample CL program POPTEST1 in source file SOURCE in library RJSPOP3.

Running the Automated POP3 Mailbox Monitor - POPMON

This command can be run to automatically retrieve POP3 email messages interactive or as part of a batch job. When run in batch, POPMON command should be submitted to job queue QSYSNOMAX so it runs within the QSYSWRK subsystem and does not impede other AS/400 jobs.

Run the POPMON command (menu option 13) and fill in the appropriate prompts:

POPMON parameters

Delay processing or run once - This option determines whether the monitor will run one time or continuosly until the specified end time.

Delay between cycles - This option determines how long the monitor will sleep between each mailbox check.

Time to end program - This option determines when the monitor program will end for the day. 000000 = Never end.

Output file to hold messages - This parameter defaults to the POPMSG file in library RJSPOP3. Each retrieved message will be placed in a message file member.

POP3 Server IP Address - Enter the POP3 server IP address. Note: We will be adding DNS support very soon, so host names can be used.

POP3 User - Enter the POP3 mailbox user ID. This parameter is case sensitive and single quotes should be entered in the field is mixed or lower case values are entered.

POP3 Password - Enter the POP3 mailbox password. This parameter is case sensitive and single quotes should be entered in the field is mixed or lower case values are entered.

Download message headers into the POP3 session log - This setting should normally be set to *NO. Enter *YES if you want to download the POP3 message headers. This will download a portion of each message and place the header into the message log.

Download messages - This setting should normally be set to *YES. If this option is set to *YES, the messages will be downloaded.

Delete messages after download - This setting should be set to *YES if you want to empty the POP3 mailbox after messages have been retrieved.

Log entire POP3 session - This setting should normally be set to *NO. If you want one large file member created that contains the entire POP3 session for processing, set this option to *YES.

Print POP3 session log file - This setting should normally be set to *NO. If you want to print the POP3 session log after processing, set the value to *YES. This is nice for debugging problems.

Exit program to process msg - Enter an exit program name that will be used to process each message as it's retrieved. There is a sample exit program POPEXIT1C in the source file SOURCE in library RJSPOP3.

End of process exit program - Enter an exit program name that will be called after all messages have been retrieved. There is a sample exit program POPEXIT2C in the source file SOURCE in library RJSPOP3.

Press Enter to run the POPMON command to retrieve messages or submit to batch via the SBMJOB command.

POP/400 Troubleshooting Commands

20. Ping Remote POP3 Server This menu option can be used to PING the remote POP3 server.

21. Connect to POP3 Server via Telnet This menu option can be used to connect to the POP3 server to see if the POP3 service is running on TCP/IP port 110.

22. AS/400 TCP/IP Configuration Menu This menu option displays the AS/400 TCP/IP configuration menu.

Personal tools