9.136 MAIL_ADD_TEXT

Note: Built-In Function Rules     Usage Options

This Email handling Built-In Function is used to add text to the message buffer for the current email.

Successive calls enable a message text to be built up by concatenating the text to the end of the buffer. Each call may determine if a newline is to be added to the end of the text in that call.

Arguments

No

Type

Req/ Opt

Description

Min Len

Max Len

Min Dec

Max Dec

1

A

Req

Text to be added to the email message

1

Unlimited

 

 

2

A

Opt

Add new line to the end of the text.

Values:
Y - Yes
N - No

Default Y

1

1

 

 

 

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 the maximum possible length of a field type please refer to Field Type Considerations.

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 message Text)

USE BUILTIN(MAIL_ADD_TEXT) WITH_ARGS('Hello,' Y) TO_GET(#LEM_RETC)

DEFINE FIELD(#BIGLINE) TYPE(*CHAR) LENGTH(255) LABEL('Big Text Line') INPUT_ATR(LC)

CHANGE FIELD(#BIGLINE) TO('''I am sending this message just to try out the LANSA Email Built-In Functions.''')

USE BUILTIN(MAIL_ADD_TEXT) WITH_ARGS(#BIGLINE Y) TO_GET(#LEM_RETC)

USE BUILTIN(MAIL_ADD_TEXT) WITH_ARGS('Thank You' N) TO_GET(#LEM_RETC)