oracle 11G utl_mail 自动发邮件
来源:互联网 发布:mysql 日期时间格式化 编辑:程序博客网 时间:2024/04/29 19:29
The UTL_MAIL
package is a utility for managing email which includes commonly used email features, such as attachments, CC, and BCC.
This chapter contains the following topics:
Using UTL_MAIL
Security Model
Operational Notes
Rules and Limits
Summary of UTL_MAIL Subprograms
Using UTL_MAIL
Security Model
Operational Notes
Rules and Limits
Security Model
UTL_MAIL
is not installed by default because of the SMTP_OUT_SERVER
configuration requirement and the security exposure this involves. In installingUTL_MAIL
, you should take steps to prevent the port defined by SMTP_OUT_SERVER
being swamped by data transmissions.
This package is now an invoker's rights package and the invoking user will need the connect privilege granted in the access control list assigned to the remote network host to which he wants to connect.
Note:
For more information, see Managing Fine-grained Access to External Network Services in Oracle Database Security GuideOperational Notes
You must both install UTL_MAIL
and define the SMTP_OUT_SERVER.
To install UTL_MAIL:
sqlplus sys/<pwd>SQL> @$ORACLE_HOME/rdbms/admin/utlmail.sqlSQL> @$ORACLE_HOME/rdbms/admin/prvtmail.plb
You define the
SMTP_OUT_SERVER
parameter in theinit
.ora
rdbms
initialization file. However, ifSMTP_OUT_SERVER
is not defined, this invokes a default ofDB_DOMAIN
which is guaranteed to be defined to perform appropriately.
Rules and Limits
Use UTL_MAIL
only within the context of the ASCII (American Standard Code for Information Interchange) and EBCDIC (Extended Binary-Coded Decimal Interchange Code) codes.
Summary of UTL_MAIL Subprograms
Table 229-1 UTL_MAIL Package Subprograms
SEND Procedure
Packages an email message into the appropriate format, locates SMTP information, and delivers the message to the SMTP server for forwarding to the recipients
SEND_ATTACH_RAW Procedure
Represents the SEND
Procedure overloaded for RAW
attachments
SEND_ATTACH_VARCHAR2 Procedure
Represents the SEND
Procedure overloaded for VARCHAR2
attachments
SEND Procedure
This procedure packages an email message into the appropriate format, locates SMTP information, and delivers the message to the SMTP server for forwarding to the recipients. It hides the SMTP API and exposes a one-line email facility for ease of use.
Syntax
UTL_MAIL.SEND ( sender IN VARCHAR2 CHARACTER SET ANY_CS, recipients IN VARCHAR2 CHARACTER SET ANY_CS, cc IN VARCHAR2 CHARACTER SET ANY_CS DEFAULT NULL, bcc IN VARCHAR2 CHARACTER SET ANY_CS DEFAULT NULL, subject IN VARCHAR2 CHARACTER SET ANY_CS DEFAULT NULL, message IN VARCHAR2 CHARACTER SET ANY_CS, mime_type IN VARCHAR2 DEFAULT 'text/plain; charset=us-ascii', priority IN PLS_INTEGER DEFAULT 3, replyto IN VARCHAR2 CHARACTER SET ANY_CS DEFAULT NULL);
Parameters
Table 229-2 SEND Procedure Parameters
sender
Email address of the sender
recipients
Email addresses of the recipient(s), separated by commas
cc
Email addresses of the CC recipient(s), separated by commas, default is NULL
bcc
Email addresses of the BCC recipient(s), separated by commas, default is NULL
subject
String to be included as email subject string, default is NULL
message
Text message body
mime_type
Mime type of the message, default is 'text/plain; charset=us-ascii'
priority
Message priority, which maps to the X-priority field. 1 is the highest priority and 5 the lowest. The default is 3.
replyto
Defines to whom the reply email is to be sent
SEND_ATTACH_RAW Procedure
This procedure is the SEND
Procedure overloaded for RAW
attachments.
Syntax
UTL_MAIL.SEND_ATTACH_RAW ( sender IN VARCHAR2 CHARACTER SET ANY_CS, recipients IN VARCHAR2 CHARACTER SET ANY_CS, cc IN VARCHAR2 CHARACTER SET ANY_CS DEFAULT NULL, bcc IN VARCHAR2 CHARACTER SET ANY_CS DEFAULT NULL, subject IN VARCHAR2 CHARACTER SET ANY_CS DEFAULT NULL, message IN VARCHAR2 CHARACTER SET ANY_CS DEFAULT NULL, mime_type IN VARCHAR2 DEFAULT CHARACTER SET ANY_CS DEFAULT 'text/plain; charset=us-ascii', priority IN PLS_INTEGER DEFAULT 3, attachment IN RAW, att_inline IN BOOLEAN DEFAULT TRUE, att_mime_type IN VARCHAR2 CHARACTER SET ANY_CS DEFAULT 'text/plain; charset=us-ascii', att_filename IN VARCHAR2 CHARACTER SET ANY_CS DEFAULT NULL, replyto IN VARCHAR2 CHARACTER SET ANY_CS DEFAULT NULL);
Parameters
Table 229-3SEND_ATTACH_RAW Procedure Parameters
sender
Email address of the sender
recipients
Email addresses of the recipient(s), separated by commas
cc
Email addresses of the CC recipient(s), separated by commas, default is NULL
bcc
Email addresses of the BCC recipient(s), separated by commas, default is NULL
subject
String to be included as email subject string, default is NULL
message
Text message body
mime_type
Mime type of the message, default is 'text/plain; charset=us-ascii'
priority
Message priority, which maps to the X-priority field. 1 is the highest priority and 5 the lowest. The default is 3.
attachment
RAW
attachment
att_inline
Specifies whether the attachment is viewable inline with the message body, default isTRUE
att_mime_type
Mime type of the attachment, default is 'application/octet'
att_filename
String specifying a filename containing the attachment, default is NULL
replyto
Defines to whom the reply email is to be sent
SEND_ATTACH_VARCHAR2 Procedure
This procedure is the SEND
Procedure overloaded for VARCHAR2
attachments.
Syntax
UTL_MAIL.SEND_ATTACH_VARCHAR2 ( sender IN VARCHAR2 CHARACTER SET ANY_CS, recipients IN VARCHAR2 CHARACTER SET ANY_CS, cc IN VARCHAR2 CHARACTER SET ANY_CS DEFAULT NULL, bcc IN VARCHAR2 CHARACTER SET ANY_CS DEFAULT NULL, subject IN VARCHAR2 CHARACTER SET ANY_CS DEFAULT NULL, message IN VARCHAR2 CHARACTER SET ANY_CS DEFAULT NULL, mime_type IN VARCHAR2 CHARACTER SET ANY_CS DEFAULT 'text/plain; charset=us-ascii', priority IN PLS_INTEGER DEFAULT 3, attachment IN VARCHAR2 CHARACTER SET ANY_CS, , att_inline IN BOOLEAN DEFAULT TRUE, att_mime_type IN VARCHAR2 CHARACTER SET ANY_CS DEFAULT 'text/plain; charset=us-ascii, att_filename IN VARCHAR2CHARACTER SET ANY_CS DEFAULT NULL, replyto IN VARCHAR2 CHARACTER SET ANY_CS DEFAULT NULL);
Parameters
Table 229-4 SEND_ATTACH_VARCHAR2 Procedure Parameters
sender
Email address of the sender
recipients
Email addresses of the recipient(s), separated by commas
cc
Email addresses of the CC recipient(s), separated by commas, default is NULL
bcc
Email addresses of the BCC recipient(s), separated by commas, default is NULL
subject
String to be included as email subject string, default is NULL
message
Text message body
mime_type
Mime type of the message, default is 'text/plain; charset=us-ascii
priority
Message priority, which maps to the X-priority field. 1 is the highest priority and 5 the lowest. The default is 3.
attachment
Text attachment
att_inline
Specifies whether the attachment is inline, default TRUE
att_mime_type
Mime type of the attachment, default is 'text/plain; charset=us-ascii'
att_filename
String specifying a filename containing the attachment, default is NULL
replyto
Defines to whom the reply email is to be sent
- oracle 11G utl_mail 自动发邮件
- Oracle 11g 使用 UTL_MAIL 包实现存储过程发送邮件
- Oracle 11g 使用 UTL_MAIL 包实现存储过程发送邮件
- 采用oracle 11g过程发邮件 和群发邮件
- 用Oracle自动发邮件
- oracle监控自动发邮件预警
- 【Vegas原创】Oracle使用自带的UTL_MAIL发送邮件
- 【Vegas原创】Oracle使用自带的UTL_MAIL发送邮件
- oracle使用UTL_MAIL包实现存储过程邮件发送(转)
- oracle使用UTL_MAIL包实现存储过程邮件发送(转)
- Oracle 10G中轻松发送email -- UTL_MAIL
- Oracle 10G中轻松发送email -- UTL_MAIL
- C#自动发邮件
- perl 自动发邮件
- linux自动发邮件
- Python自动发邮件
- 自动发邮件脚本
- Oracle 发邮件
- 8.3.5(最大值最小化_二分查找)
- android 所有权限
- nginx开启pathinfo
- 张小龙:不一样的产品思维
- 教大家用FTPClient对ftp文件进行上传下载等操作
- oracle 11G utl_mail 自动发邮件
- 特性(Feature)与功能(Function)的差异
- 多线程同步、异步
- C++中struct与class的区别
- windows使用PUTTY ssh连接linux centOS虚拟机
- Android底层开发中通过网络使用adb的方法
- SPRING.NET 1.3.2 学习12--为索引器属性赋值
- 撒旦教的五点告诫
- 缓冲加载图片的 jQuery 插件 lazyload.js 使用方法详解