Application Express User's Guide > Oracle Application Express ... > HTMLDB_MAIL > PUSH_QUEUE Procedure
PUSH_QUEUE Procedure |
Previous |
Next |
Oracle Application Express stores unsent email messages in a table named HTMLDB_MAIL_QUEUE
. You can manually deliver mail messages stored in this queue to the specified SMTP gateway by invoking the HTMLDB_MAIL.PUSH_QUEUE
procedure.
Oracle Application Express logs successfully submitted message in the table HTMLDB_MAIL_LOG
with the timestamp reflecting your server's local time. Keep in mind, the most efficient approach to sending email is to create a background job (using a DBMS_JOB
package) to periodically send all mail messages stored in the active mail queue.
Syntax
HTMLDB_MAIL.PUSH_QUEUE( p_smtp_hostname IN VARCHAR2 DEFAULT, p_smtp_portno IN NUMBER DEFAULT;
Parameters
Table: PUSH_QUEUE Parameters describes the parameters available in the PUSH_QUEUE
procedure.
PUSH_QUEUE Parameters
Parameters | Description |
---|---|
|
SMTP gateway host name |
|
SMTP gateway port number |
Note that these parameter values are provided for backward compatibility, but their respective values are ignored. The SMTP gateway hostname and SMTP gateway port number are exclusively derived from the Application Express environment settings when sending e-mail.
Example
The following example demonstrates the use of the HTMLDB_MAIL.PUSH_QUEUE
procedure using a shell script. This example only applies to UNIX/LINUX installations. In this example, the SMTP gateway host name is defined as smtp01.oracle.com
and the SMTP gateway port number is 25
.
SQLPLUS / <<EOF FLOWS_020100.HTMLDB_MAIL.PUSH_QUEUE('smtp01.oracle.com','25'); DISCONNECT EXIT EOF