UTL_MAIL v15
The UTL_MAIL
package manages email. EDB Postgres Advanced Server supports the following procedures.
Function/procedure | Return Type | Description |
---|---|---|
SEND(sender, recipients, cc, bcc, subject, message [, mime_type [, priority ]]) | n/a | Packages and sends an email to an SMTP server. |
SEND_ATTACH_RAW(sender, recipients, cc, bcc, subject, message, mime_type, priority, attachment [, att_inline [, att_mime_type [, att_filename ]]]) | n/a | Same as the SEND procedure but with BYTEA or large object attachments. |
SEND_ATTACH_VARCHAR2(sender, recipients, cc, bcc, subject, message, mime_type, priority, attachment [, att_inline [, att_mime_type [, att_filename ]]]) | n/a | Same as the SEND procedure but with VARCHAR2 attachments. |
Note
An administrator must grant execute privileges to each user or group before they can use this package.
SEND
The SEND
procedure sends an email to an SMTP server.
Parameters
sender
Email address of the sender.
recipients
Comma-separated email addresses of the recipients.
cc
Comma-separated email addresses of copy recipients.
bcc
Comma-separated email addresses of blind copy recipients.
subject
Subject line of the email.
message
Body of the email.
mime_type
Mime type of the message. The default is text/plain; charset=us-ascii
.
priority
Priority of the email The default is 3
.
Examples
The following anonymous block sends a simple email message.
SEND_ATTACH_RAW
The SEND_ATTACH_RAW
procedure sends an email to an SMTP server with an attachment containing either BYTEA
data or a large object (identified by the large object's OID
). You can write the call to SEND_ATTACH_RAW
in two ways:
or
Parameters
sender
Email address of the sender.
recipients
Comma-separated email addresses of the recipients.
cc
Comma-separated email addresses of copy recipients.
bcc
Comma-separated email addresses of blind copy recipients.
subject
Subject line of the email.
message
Body of the email.
mime_type
Mime type of the message. The default is text/plain; charset=us-ascii
.
priority
Priority of the email. The default is 3
.
attachment
The attachment.
att_inline
If set to TRUE
, then the attachment is viewable inline. The default is TRUE
.
att_mime_type
Mime type of the attachment. The default is application/octet
.
att_filename
The file name containing the attachment. The default is NULL
.
SEND_ATTACH_VARCHAR2
The SEND_ATTACH_VARCHAR2
procedure sends an email to an SMTP server with a text attachment.
Parameters
sender
Email address of the sender.
recipients
Comma-separated email addresses of the recipients.
cc
Comma-separated email addresses of copy recipients.
bcc
Comma-separated email addresses of blind copy recipients.
subject
Subject line of the email.
message
Body of the email.
mime_type
Mime type of the message. The default is text/plain; charset=us-ascii
.
priority
Priority of the email The default is 3.
attachment
The VARCHAR2
attachment.
att_inline
If set to TRUE
, then the attachment is viewable inline. The default is TRUE
.
att_mime_type
Mime type of the attachment. The default is text/plain; charset=us-ascii
.
att_filename
The file name containing the attachment. The default is NULL
.
- On this page
- SEND
- SEND_ATTACH_RAW
- SEND_ATTACH_VARCHAR2