Where allowed to run: All environments (*ALL) Threadsafe: No |
Parameters Examples Error messages |
The Send Email to Database (DBMAIL) command sends an HTML or plain text email to the the email address found in the specified database file. The EMAIL field is identified along with the optional Query String (SQL WHERE clause). The query string is used to subset the records in the file that are sent the email message. The email must be stored in a text file on the IFS (currently) and will be sent to each receipient.
Restrictions:
Top |
Keyword | Description | Choices | Notes |
---|---|---|---|
FROM | Sent from email address | Character value | Required, Positional 1 |
STMF | IFS Streamfile | Path name | Required, Positional 2 |
SUBJECT | Email Subject | Character value, *BLANK | Required, Positional 3 |
FILE | Database file | Qualified object name | Required, Positional 4 |
Qualifier 1: Database file | Name | ||
Qualifier 2: Library | Name | ||
Email field name | Name, EMAIL | Optional, Positional 5 | |
WHERE | SQL Where (selection) clause | Character value | Optional, Positional 6 |
ORDERBY | SQL Order by | Character value | Optional, Positional 7 |
Top |
Top |
Specify the fully qualified IFS file name that is going to be sent as an EMAIL to the list of email addresses. This file may contain full HTML or it can be plain ASCII text.
This is a required parameter.
Top |
Specify the subject line for the email.
This is a required parameter.
Top |
Specify the database file that contains email addresses. any Externally Described Database file may be used.
This is a required parameter.
Database file
Top |
Specify the name of the field in the database file that contains the email address. This field is extracted from the file and an email is sent to the email address in the field.
Top |
Specify an SQL WHERE clause to be used to subset the records being selected. Only records that match this WHERE clause shall be included. DO NOT INCLUDE THE SQL KEYWORD "WHERE" on this parameter. Up to 1024 characters may be specified for this parameter.
WHERE('state in (''IL'',''IN'',''IA'') and status =''A''')
Top |
Specify an SQL ORDER BY clause to sequence the data being selected. DO NOT INCLUDE THE SQL KEYWORD "ORDER BY" on this parameter. Up to 1024 characters may be specified for the ORDER By parameter. Each field in the "key sequence" must be separated by a comma.
ORDERBY('country,Company,orddate desc')
Top |
Top |
Top |