OPEN

LANSA Integrator

OPEN

The OPEN command will login into the POP3 server and read any email messages stored for that user.

If the server, user and password are not defined in the service's properties file they must be provided in the OPEN command.

Internally a folder object is created to hold these messages. The GET and DELETE commands work against this internal folder object.

 

                                                           Optional

 

 OPEN -------- SERVER ---------- host --------------------------->

 

           >-- SECURE ---------- *NO ---------------------------->

                                 *YES

                                 *IMPLICIT

                                 *EXPLICIT

 

           >-- USER ------------ value -------------------------->

 

           >-- PASSWORD -------- value -------------------------->

 

           >-- PORT ------------ 110 ---------------------------->

                                 number

 

           >-- RECIPIENT ------- name:password ------------------|

 

Keywords

SERVER

The server address for the POP3 server.

The server address must be provided if it has not been configured in the service properties file.

The SERVER property is typically configured in the POP3MailService properties file. 

SECURE

Connect to the server using SSL.

Implicit connects to port 995 using SSL.

Explicit connects to port 110 and upgrades to a TLS session.

USER

The POP3 mail user's login identification.

The mail user must be provided if it has not been configured in the service properties file.

The USER property is typically configured in the POP3MailService properties file.

PASSWORD

The password corresponding to the POP3 User provided as the USER keyword.

The mail user's password must be provided if it has not been configured in the service properties file.

The PASSWORD property is typically configured in the POP3MailService properties file.

PORT

Nominate the TCP port to be used for POP3.

The default for POP3, port 110, is used if an alternative port number is not supplied.

If a port other than 110 is used the PORT property is typically configured in the POP3MailService properties file.

RECIPIENT

This keyword is required to decrypt secure messages that have been encrypted with the recipient's public key.

The recipient value is comprised of two parts, the name and password in the format name:password. These values are used to access the appropriate private key store and security certificate information in the POP3 service properties.

The X509 public certificate file to be used is obtained from the property recipient.certificate.{name}.

The PKCS8 keystore file to be used is obtained from the property recipient.keystore.{name}. The keystore password is the password component.

So for example if your recipient name is POP3SIGN your POP3MailService properties file would need to include entries like:

 

recipient.keystore.POP3SIGN=test-input/pop3-recipient-key.p8

recipient.certificate.POP3SIGN=test-input/pop3-recipient-certificate.cer

 

Then to receive an encrypted email you would issue a JSM command like:

 

use builtin(jsmx_command) with_args(#jsmxhdle1 'open recipient(POP3SIGN:password)') TO_GET(#jsmxsts #jsmxmsg)

 

Examples

RDML

In this example the SERVER, USER and PASSWORD keyword values are explicitly defined as part of the command.

 

USE BUILTIN(TCONCAT) WITH_ARGS('OPEN SERVER(' #JSMSERVER ') USER(' #JSMUSER ') PASSWORD(') TO_GET(#JSMCMD)

USE BUILTIN(TCONCAT) WITH_ARGS(#JSMCMD #JSMPSSWRD ')') TO_GET(#JSMCMD)

USE BUILTIN(JSM_COMMAND) WITH_ARGS(#JSMCMD) TO_GET(#JSMSTS #JSMMSG)USE BUILTIN(JSM_COMMAND) 

 

 

RDMLX

In this example the SERVER, USER and PASSWORD keyword values are explicitly defined as part of the command.

 

#jsmcmd := 'open server(' + #jsmserver + ') user(' + #jsmuser + ') password(' + #jsmpassword + ')'

use builtin(jsmx_command) with_args(#jsmhandle #jsmcmd) to_get(#jsmsts #jsmmsg)