A component designed to send emails.
Send mail from queues.
You most commonly use this component as a menu item job that runs continuously.
The components uses system settings listed under the SMTP heading.
SMTPRelay is the most important, and is the address of the mail server.
SMTPLibrary lets you choose between
Go to Admin > Local Settings in your system for a full list of settings.
Statement to extract e-mail information. Each row in the first resultset corresponds to an e-mail. Each row in the remaining resultsets corresponds to an attachment, and all attachments are attached to all e-mails. Thus, if an email needs unique attachments it should be returned alone.
The component will make this call repeatedly until it receives a resultset with no mail to send in, which signals that the mail queue is empty.
Resultset that contains e-mail data.
An e-mail can contain a HTML body, a plaintext body, or both. If supplying both HTLM and plaintext, the plaintext version will be used only by old mail clients that can't render HTML.
If specifying a HTML body, you should not wrap it in <HTML> or <BODY> tags.
Whether a plain text version of the message should automatically be generated from the HTML body.
The plain text version will contain the same text as the html message but with all HTML tags removed except <br> and <p> tags, which will be replaced by newlines.
The 'body' property in the email. If this is an html e-mail the contents of this column will be inserted within the <body> section of the html document. You should not include your own <html>, <head> or <body> tags in this column. If this column is null it will be ignored.
This is a legacy column. Do use the Body_Html or Body_Text columns instead of the Body and Html columns.
HTML to send as message body.
Mutually exclusive with the Body-column.
Text to send as message body.
This column can be used together with the Body_Html column, which will cause the message to contain both a HTML body and a plaintext fallback for old mail clients.
Mutually exclusive with the Body-column.
Whether the Body column contains HTML or text.
This is a legacy column. Do use the Body_Html or Body_Text columns instead of the Body and Html columns.
Statement that is executed after each e-mail to confirm that the email was sent (no resultset is expected), this database call is only executed if the column 'emailid' is returned in SQL (database call 2).
Call made when an e-mail failed to be sent. This only indicates the sending SMTP server refused the mail, this does not ensure the e-mail could be delivered to the recipient.
Possible value | Description |
---|---|
1 | No recipients specified. No recipients were specified in any of the fields To, CC, BCC. |
-1 | Unknown error. |
2 | The mail message contains invalid data such as NULL in body column. |
3 | At least one attachment wasn't generated correctly. |
Allows you to validate the SQL parameters before any other SQL is run in the component. This call is only made if the SQL is a stored procedure and Validate parameters is checked.
Use this call to restrict which entries a user is allowed to view and edit, and to log which entries a user views.
Access to a menu item is normally controlled through functions and roles alone but some entities need more fine grained control. For example, a user may have access to the View Member menu item for normal members but not for members with a protected identity.
The menu items a user visits are always logged (in ADMINLogMenuItem) but for sensitive data you may need to log exactly what entries are viewed. Do the logging in this call as the common ways of viewing data (grid and InfoSQL) are not allowed to modify the database.
If you bind a scalar function instead of a stored procedure to this call then its name must end with '_GrantAccess'.