im_login

Specifies the IMAP mail server URL and login credentials.

Member of namespace

Imail

Syntax

bool im_login(string hostname, string username, string password)

Parameters

Smart parameters are supported for all parameters.

hostname
A string that specifies the following attributes of the IMAP mail server:
String inclusion Attribute
Required The URL or IP address.
Optional The port number. This number is at the end of the string and preceded by a colon.
username
The username for the mail account.
password
The password for the mail account.

Returns

True If the login succeeds. Otherwise, False.

Level

Batch level Open event only.

Details

Connects to the mail server by using the specified account information. Specifies the mail server URL and login credentials. Login credentials are for a mail server that supports the IMAP protocol (such as MS Exchange, and many others). Call one time for each batch.

The password can be encrypted by storing it in the Advanced section of the Custom tab in the Datacap Application Manager. The URL and user name parameters can be stored in the General section of the Application Manager but they cannot be encrypted. To retrieve the password that is stored in the Advanced section, use a smart parameter for the action's password parameter similar to @APPVAR(values/adv/mailPassword) where mailPassword is the name that is entered for the value in the Application Manager.

You can affect the behavior of this action by first calling the following actions:
To connect on an encrypted channel by using the SSL / HTTPS protocol Call im_useSSL(True).
To connect by using a proxy service Call im_SetProxy.
Example:
im_login("mymailserver.com","theuser","password")
im_login("mymailserver.com:9080","theuser","password")