The UTL_MAIL module provides the capability to send e-mail.
The schema for this module is SYSIBMADM.
The UTL_MAIL module includes the following routines.
Routine name | Description |
---|---|
SEND procedure | Packages and sends an e-mail to an SMTP server. |
SEND_ATTACH_RAW procedure | Same as the SEND procedure, but with BLOB attachments. |
SEND_ATTACH_VARCHAR2 | Same as the SEND procedure, but with VARCHAR attachments |
In order to successfully send an e-mail using the UTL_MAIL module, the database configuration parameter SMTP_SERVER must contain one or more valid SMTP server addresses.
db2 update db cfg using smtp_server 'smtp.ibm.com'
db2 update db cfg using smtp_server 'smtp2.ibm.com:2000'
db2 update db cfg using smtp_server
'smtp.example.com,smtp1.example.com:23,smtp2.example.com:2000'