9.138 MAIL_SET_OPTION
Used to set various options which may be required by the mail system.
Refer to Email Built-In Functions Notes before using this Built-In Function.
LANSA for i Specific Options
Option Name | Option Values | Option Default |
|---|---|---|
PRIORITY | 'NORMAL' | 'NORMAL' |
SENSITIVITY | 'NONE' | 'NONE' |
IMPORTANCE | 'NORMAL' | 'NORMAL' |
MESSAGE_CCSID | String | '65535' |
CONTENT_TYPE | String | 'text/plain' |
Visual LANSA Specific Options
Option Name | Option Values | Option Default |
|---|---|---|
PROFILENAME | String | "Windows Messaging Settings" |
PASSWORD | String | None - empty string |
MAPI_NEW_SESSION | Y/N | N |
MAPI_LOGON_UI | Y/N | N |
MAPI_PASSWORD_UI | Y/N | N |
Options Applicable to All Platforms
These options may be used on any platform.
Option Name: | Option Values | Option Default |
|---|---|---|
RECEIPT_REQUESTED | Y/N | N |
Arguments
No | Type | Req/ Opt | Description | Min Len | Max Len | Min Dec | Max Dec |
|---|---|---|---|---|---|---|---|
1 | A | Req | Option Name (see descriptions above). | 1 | 20 | ||
2 | A | Req | Option Value (see descriptions above). | 1 | 255 |
Return Values
No | Type | Req/ Opt | Description | Min Len | Max Len | Min Dec | Max Dec |
|---|---|---|---|---|---|---|---|
1 | A | Opt | Return Code OK - Action completed ER - Error occurred | 2 | 2 |
Technical Notes
The MAPI interface is used on the Windows platform. MAIL_SET_OPTION calls may be required for logon to the MAPI mail provider which begins a session with the messaging system. To request the display of a logon dialog box if the credentials presented (password) fail to validate the session, set the MAPI_LOGON_UI or MAPI_PASSWORD_UI option. If you do not allow the display of the dialog box, all logon information, default or specified must be valid or the MAIL_SEND will fail during the MAPI logon phase with very little information available as to the cause of the failure. The information set in this way is not used until a MAIL_SEND call is issued at which time an attempt at logon validation will take place.
Details of the email definition will be lost unless the MAIL_SEND Built-In Function is used to send the message.
If any error occurs, all details of the email definition will be lost. To restart processing, a new call to MAIL_START would be required.
The PRIORITY, SENSITIVITY and IMPORTANCE mail options are usually ignored by PC mail clients. It is your responsibility to verify they work properly in your environment.
The RECEIPT_REQUESTED: Y mail option may either be ignored or disabled by PC mail clients, or disabled at the recipient mail server to prevent spam. It is your responsibility to verify it works properly in your environment.
Example
This example shows only this function. See the example for MAIL_START which defines all details of an Email message and then sends it by using Built-In Functions.
********** COMMENT(Set receipt acknowledgement is required)
USE BUILTIN(MAIL_SET_OPTION) WITH_ARGS(RECEIPT_REQUESTED Y) TO_GET(#LEM_RETC)