name:sp_Send_mail
parameter: Rcpter in varchar2 接收者邮箱
Mail_Content in Varchar2 邮件内容
create date:2003-06-01
creater:chen jiping
desc: &.#8226.发送邮件到指定邮箱
&.#8226.只能指定一个邮箱,如果需要发送到多个邮箱,需要另外的辅助程序
create or replace procedure sp_send_mail(
Rcpter IN VARCHAR2,
Mail_Content IN VARCHAR2)
IS
conn utl_smtp.connection.
PROCEDURE send_header(NAME IN VARCHAR2, header IN VARCHAR2) AS
BEGIN
utl_smtp.write_data(conn, NAME || : || header || utl_tcp.CRLF).
END.
BEGIN
conn := utl_smtp.open_connection( smtp.ur.net.cn ).
utl_smtp.helo(conn, oracle ).
utl_smtp.mail(conn, oracle info ).
utl_smtp.rcpt(conn, Rcpter).
utl_smtp.open_data(conn).
send_header( From , Oracle Database ).
send_header( To , "Recipient" < |