Deprecated - This page is no longer relevant, See: Javascript V2 Emailing


RdbHost ordinarily delivers the results of a query as an XML, JSON or binary page, where the data is just formatted per the indicated format and delivered to the client. If you use the email mode, though, the server processes the results before responding. In this case, the server interprets the data content as one or more emails to send, sends them, and presents the requester with a different set of data, representing the status of the email transmittal effort.

Query Result Data

Each record from the query dataset must contain the following fields:

Each record from the query dataset may contain the following fields:

Mode Parameter

The email mode is requested with the mode parameter, using the value 'email'.

Email queries can be stored in the preauth_queries table, and the mode recorded there is not overridable. A preauthorized query can be saved and made available to anonymous users to send emails to various pre-recorded email addresses without disclosing to the user what those email addresses are.

Result Page to Client

If the query succeeds, and the data includes the necessary fields (as described above), the server will send an email for each record, and record 'Success' or an error message for each record. The result page will be a list of 2-tuples, including the unique 'Idx' value and the result for each email, formatted with the secondary format as described in the previous paragraph.

If the query fails altogether, the error message sent to the client browser is the same as if mode were not specified. ie: a json error message about why the query failed.