sending email with forms 6i [message #83284] |
Wed, 03 September 2003 09:19 |
andy appleton
Messages: 1 Registered: September 2003
|
Junior Member |
|
|
How can i send email via web forms?
I am using forms 6i
I have tried OLE2 and while this worked on my local Pc when i tried it on the web, it failed.
I understand webutil is only available with forms 9i.
Can i use UTL_SMTP and if so, how?
many thanks
|
|
|
|
Re: sending email with forms 6i [message #83294 is a reply to message #83284] |
Tue, 16 September 2003 22:41 |
vimal
Messages: 46 Registered: February 2000
|
Member |
|
|
UNCTION 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;
|
|
|