|
|
Re: how can i send e-mail [message #81351 is a reply to message #81312] |
Sat, 08 February 2003 00:36 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
AMIT KARKHANIS
Messages: 3 Registered: February 2003
|
Junior Member |
|
|
Hi all
My Problem is I m using Oracle7 Server Release 7.3.2.2.0 - Production Release
With the distributed option. I cant use that code. Is there any thing else available
Bye
Amit
|
|
|
Re: how can i send e-mail [message #81408 is a reply to message #81312] |
Thu, 13 February 2003 23:31 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
vimal
Messages: 46 Registered: February 2000
|
Member |
|
|
hi
make this function and call it ,
FUNCTION SEND_MAIL_HTML(
server_name varchar2,
sender_name varchar2,
sender_mail varchar2,
receiver_mail varchar2,
subject varchar2,
message varchar2
)
RETURN NUMBER IS
PORT NUMBER :=25;
CONN UTL_SMTP.CONNECTION;
CRLF VARCHAR2(2) := CHR(13)||CHR(10);
SEND_DATA VARCHAR2(4000);
BEGIN
CONN := UTL_SMTP.OPEN_CONNECTION(SERVER_NAME,PORT);
UTL_SMTP.HELO(CONN,SENDER_NAME);
UTL_SMTP.MAIL(CONN,SENDER_MAIL);
UTL_SMTP.RCPT(CONN,RECEIVER_MAIL);
SEND_DATA := 'CONTENT-TYPE : text/html'||CRLF;
SEND_DATA := SEND_DATA||'SUBJECT :'||SUBJECT||CRLF||MESSAGE;
UTL_SMTP.DATA(CONN,SEND_DATA);
UTL_SMTP.QUIT(CONN);
RETURN 0;
EXCEPTION
WHEN OTHERS THEN
RETURN -1;
END;
|
|
|