SEND_MAIL

Use the SEND_MAIL script function to send an email to a user. This script function does not verify whether the specified receiver actually exists. The message is sent even if the receiver is not correct. When the email cannot be sent because the attachment cannot be found or the email connection is not active, script processing continues by default. In this case, the script function returns the corresponding return code.

Important!

Tip: Use the :ON_ERROR script statement to define actions that should take place if the email cannot be sent successfully. For more information, see Script Elements for Error Handling.

SEND_MAIL (Receiver, [Cc], Subject, Text[, Attachment][, Agent][, Login])

Parameters

Return Codes

Examples

The following example sends an email to exactly one user, the cc parameter is not used. One file is attached to this email.

:SET &OUT# = SEND_MAIL('brown@automic.at',,'Meeting','Meeting today at 5pm', '/AE/agenda')

An email that includes two attachments is sent to several persons:

:SET &OUT# = SEND_MAIL("brown@automic.at;smith@automic.us",,"Meeting","Meeting canceled","c:\AUTOMIC\agenda.doc;c:\AUTOMIC\dates.txt")

See also:

seealso

Error Handling in Scripts

Notification (CALL)

User Return Codes of Executable Objects

System Return Codes of Executable Objects

Script Elements for Error Handling