9.137 MAIL_ADD_RECIPIENT

Note: Built-In Function Rules     Usage Options

This Email handling Built-In Function is used to add the name of a recipient for the current email.

Successive calls enable an internal list of recipients to be built up. As a minimum you would normally define at least one recipient of class "TO".

Arguments

No

Type

Req/ Opt

Description

Min Len

Max Len

Min Dec

Max Dec

1

A

Req

Recipient Class.

Values:

TO - To
CC - Copy to
BCC - Blind copy to

2

3

 

 

2

A

Req

Display name of the message recipient.

1

255

 

 

3

A

Opt

Recipient's address. This address is provider-specific message delivery data.

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

   For example:

Microsoft PC Mail:

MS:network/postoffice/mailbox

Internet:

SMTP:mailbox@companyname.com

Example

This example shows only this function. Refer to the 9.142 MAIL_START example, which defines all details of an Email message.

Note: If you wish to use this example for testing you should insert a valid display name as the second argument and insert a valid recipient's address as the third argument.

********** COMMENT(Set Recipient using TO argument)

********** COMMENT(may also set others for TO CC BCC)

lansaELSE

USE BUILTIN(MAIL_ADD_RECIPIENT) WITH_ARGS(TO '<-- name -->' 'SMTP:<-- recipient@address -->')

TO_GET(#LEM_RETC)