SendEmailAttachText

STD.System.Email.SendEmailAttachText ( to, subject, body, attachment, mimeType, attachmentName, mailServer, port, sender, cc, bcc, highPriority, rptErrAsFail )

toA null-terminated string containing a comma-delimited list of the addresses of the intended recipients. The validity of the addresses is not checked, so it is the programmer's responsibility to ensure they are all valid.
subjectA null-terminated string containing the subject line.
bodyA null-terminated string containing the text of the email to send. This must be character encoding "ISO-8859-1 (latin1)" (the ECL default character set). Text in any other character set must be sent as an attachment.
attachmentA null-terminated string containing the text to attach.
mimeTypeA null-terminated string containing the MIME-type of the attachment, which may include value pairs (type/subtype) such as 'text/plain'. You can also add optional parameters, such as 'text/plain; charset=ISO-8859-3'.
attachmentNameA null-terminated string containing the name of the attachment for the mail reader to display.
mailServerOptional. A null-terminated string containing the name of the mail server. If omitted, defaults to the value in the SMTPserver environment variable.
portOptional. An UNSIGNED4 integer value containing the port number. If omitted, defaults to the value in the SMTPport environment variable.
senderOptional. A null-terminated string containing the address of the sender. If omitted, defaults to the value in the emailSenderAddress environment variable.
ccOptional. comma-delimited addresses of carbon copy recipients. Defaults to an empty string (none).
bccOptional. comma-delimited addresses of blind carbon copy recipients. Defaults to an empty string (none).
highPriorityOptional. A boolean TRUE/FALSE flag that, when TRUE, the message is sent with high priority. Defaults to FALSE (normal priority).
rptErrAsFailOptional. A boolean TRUE/FALSE flag that, when TRUE, any error while trying to send the email results in an error/exception. Defaults to TRUE.

The SendEmailAttachText function sends an email message with a text attachment.

Example:

IMPORT STD;
STD.System.Email.SendEmailAttachText( 'me@mydomain.com', 'testing 1,2,3',
                                 'this is a test message', 'this is a test attachment',
                                 'text/plain; charset=ISO-8859-3',  'attachment.txt');