Please enable JavaScript to view this site.

Manual InterForm400 English 2023

Navigation: Emailing > Email log

Work with email log command

Scroll Prev Top Next More

This command, APF3812/WRKMAILLOG works exactly like the menu option ‘5. Work with email log’, which can be found via ‘80. Administering InterForm 400', ‘50. Email administration’.

 

The command can be called with these parameters:

 

 

                        Work with mail log (WRKMAILLOG)                        

                                                                               

Type choices, press Enter.                                                    

                                                                               

Job name . . . . . . . . JOB           *ALL       Name, *ALL                  

User . . . . . . . . . . USER         > *ALL       Name, *ALL                  

OutBox . . . . . . . . . OUTBOX       > INVOICES   Name, *ALL                  

Text . . . . . . . . . . TEXT           *ALL                          

                                                                             

From email address . . . FROMADR       *ALL                          

                                                                             

To email address . . . . TOADR         *ALL                          

                                                                             

Status . . . . . . . . . STATUS       > *FAILED     *ALL, *READY, *SENT...    

Views  . . . . . . . . . VIEWS         *ALL       *ALL, *SUBJECT, *FROMADR...  

                          + for more values                                    

                                                                               

                                                                               

                                                                               

                                                                               

                                                                        Bottom

F3=Exit   F4=Prompt   F5=Refresh   F12=Cancel   F13=How to use this display    

F24=More keys                                                                

                                                                               

             

All of them selects a subset of the emails except the VIEWS field. The VIEWS field can be used for selecting which fields, that you want to include on the list of emails. Possible values are: *ALL,*SUBJECT, *FROMADR,*TOADR,*OUTBOX. You can select one or more of these fields.

 

The Work Mail Log Command (APF3812/WRKMAILLOG) shows a list of the e-mails, that have been sent:

 

 

 

         Work with email log                                          SMP100D  

                                                                               

Position to . . . . . .                Date                                    

                                       Time                                    

                                                                               

Type options, press Enter.                                                    

  1=Send   3=Hold   4=Delete   5=Display   6=Release   11=Open email                      

  12=Work with receivers                                                      

                                                                               

Opt  Date/time    Email text                                         Status    

 __  11-27 16:47  Test *IBMSMTP                                      *IBMSMTP  

 __  11-27 16:48  Test *IBMSMTP 2                                    *IBMSMTP  

 __  11-27 16:50  Test *IBMSMTP 3                                    *IBMSMTP  

 __  11-27 17:11  Test gennem IMAD01                                 *SENT    

 __  11-27 17:12  Test gennem IMAD01                                 *SENT    

 __  11-27 17:14  Test gennem IMAD01                                 *HELD    

 __  11-27 17:15  Test gennem IMAD01                                 *ERROR    

 __  11-27 17:23  Test gennem IMAD01                                 *ERROR    

 __  12-13 10:52  test1                                              *FAILED  

 __  12-13 14:53                                                     *IBMSMTP  

 __  12-13 14:54                                                     *READY    

                                                                       More...

F3=Exit   F5=Refresh   F11=View 2   F12=Cancel   F15=Subset                      

                                                                               

 

 

With option 4=Delete you can delete emails, that have not been sent. To delete other emails you need to use the command, APF3812/CLRMAILLOG.

 

Possible statuses for e-mails sent via InterForm400 SMTP are:

 

*ERROR, *FAILED, *HELD, *READY, *RETRY, *SENT and combined *RSEF.

 

E-mails sent via OS400 SMTP cannot be monitored in the same details so such e-mails always have the status *IBMSMTP to indicate that the e-mail have been transferred onto the OS400 SMTP/MSF servers.These emails cannot be opened with option 11, as they are deleted from the /APF3812Mail/OutBox directory, when they have been sent. Hence InterForm400 SMTP is recommended.

 

Status

The other statuses means this:

(See details via option 12=Work with receivers if the status indicates a problem.)

 

*ERROR        

Indicates that the e-mail could not be sent. InterForm400 SMTP tried once, but got an error message back. Perhaps the receiving e-mail account does not exist?        

 

*FAILED        

Indicates that InterForm400 attempted to send the e-mail more than once, but after all retry attempts the e-mail still could not be sent.

 

*HELD                

An e-mail that have been registered to be sent (*READY), that have been held via option 3=Hold or generated with held. Refer to this for information of how to register e-mails. A held email can be sent via option 1=Send.

 

*READY        

E-mails that have been registered to be send later (via the APF3812/SNDMAILS command).

 

*RETRY        

InterForm400 SMTP did not succeed in sending out the e-mail in the first attempts but it is still trying...

 

*SENT                

The e-mail have been successfully sent via InterForm400 SMTP.

 

*RSEF                

This is a combined status of e-mails that are sent to multiple receivers. The status includes some of the letters R,S,E and F depending on the status of the e-mails sent to each receiver:

R is included if *RETRY or *READY is the status for at least one receiver.

S is included if *SENT is the status for at least one receiver.

E is included if *ERROR is the status for at least one receiver.

F is included if *FAILED is the status for at least one receiver.

 

With F15=Subset you can subset the list above to include only specific emails. You can e.g. chose to only see the emails in error or emails for a specific email address:

 

 

                                                                 

                          Subset list                            

                                                                 

Job name  . . . . . . .                

User  . . . . . . . . .                        

OutBox  . . . . . . . .                    

Subject . . . . . . . .   present                                

From email address  . .                                        

To email address  . . .   santa_claus@northpole.com              

From date/time  . . . .            DDMMYY  HHMMSS

To date/time  . . . . .            DDMMYY  HHMMSS

Status  . . . . . . . .   *ERROR    *READY, *SENT, *RETRY,    

                                      *ERROR, *FAILED, *IBMSMTP  

                                                                 

F3=Exit   F12=Cancel                                            

                                                                 

 

You could e.g. use the subset above to subset the list to only include emails containing the phrase “present” in the subject for the email address “santa_claus@northpole.com”, which are in status “*ERROR”.

 

Regarding the status of the emails:

 

The email consists of 2 parts: user name and domain. The user name is to the left of the @-sign and then domain is to the right of the @-sign.

 

When you try to send an email, then there can be 3 error scenarios:

 

1.The domain does not exist or the receiving mail server does not answer within the specified retries.

2.The domain exists, but the user name does not exist.

3.The syntax of the email address is wrong (e.g. missing an @-sign or invalid characters are used).

 

Each scenario is handled like this:

 

1.If the domain does not exist: You will get an error in the InterForm400 mail log - status *ERROR or *FAILED.

2.If the domain exists and the user does not exist, then the status of the email will be *SENT, but the email address, which is setup as the sender will receive an email telling that the email could not be delivered. This scenario cannot be found in InterForm400 as the email goes directly to the sender.

3.If there is a syntax error in the email address e.g. a missing @-sign, then one of two things can happen: a) If you on the email finish definition has selected option '13. Email address syntax error handler' and here setup an email address which will receive those emails with a bad email address. The email will contain this as the subject: 'Syntax error in email address: <wrong email address>' and the rest of the email (including attachments). The special subject is possible to use as a condition e.g. in F15=Subset above. b) If you have not setup a syntax error handler as above, then you will get an error message in the AFC job when you try send the email.