9.156 MAIL_ADD_ORIGINATOR
Þ Note: Built-In Function Rules.
This Email Handling Built-In Function is used to add the name of the original sender for the current email.
This call will allow you to specify the original sender for the message.
For use with
|
Arguments
|
Return Values
|
Technical Notes
- On Windows systems, the mail system will normally use the current mail user as the original sender and will ignore this setting but no error will occur.
- On IBM i, a mail message requires a minimum of one originator (normally you would only provide one originator). If no originator is provided, the current user's email address is used. The current user must be registered in the SNADS directory and have a SMTP alias.
- Under IBM i, enter the full email address (the address type prefix SMTP: is optional) in either the display name argument or the sender's address argument if a display name is specified.
- 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.
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.
Note: If you wish to use this example for testing you will need to insert a valid recipient's address in the required argument.
********** COMMENT(Define Message Originator if IBM i)
********** COMMENT(MAPI on non-IBM i usually defaults)
IF COND(*HOST)
USE BUILTIN(MAIL_ADD_ORIGINATOR) WITH_ARGS('SMTP:<-- recipient@address -->') TO_GET(#LEM_RETC)
ENDIF