Email Facility [message #78913] |
Fri, 29 March 2002 22:51  |
Sachin Kulkarni
Messages: 2 Registered: March 2002
|
Junior Member |
|
|
Hi All,
Can anybody please give the source code for
creating email facility from Forms 6i and for backend
as Oracle 8i.
I want the source code which will able to work for
emailing, as we normally use the email facility.
Please reply,
Thanks and regards
Sachin
|
|
|
Re: Email Facility [message #78914 is a reply to message #78913] |
Sat, 30 March 2002 00:29  |
Subhash
Messages: 105 Registered: October 2001
|
Senior Member |
|
|
PROCEDURE send_email
( sendernm IN VARCHAR2,
senderid IN VARCHAR2,
recipient IN VARCHAR2,
subject IN VARCHAR2,
message IN VARCHAR2,
mailsrvr IN VARCHAR2)
IS
host VARCHAR2(30) := mailsrvr;
mail_conn utl_smtp.connection;
crlf VARCHAR2( 2 ):= CHR( 13 ) || CHR( 10 );
msg VARCHAR2( 4000 );
BEGIN
mail_conn := utl_smtp.open_connection(host, 25);
msg:= 'Date: ' || TO_CHAR( SYSDATE, 'dd Mon yy hh24:mi:ss' ) || crlf ||
'From: '||sendernm||'<' ||senderid||'>' || crlf ||
'Subject: '||subject || crlf ||
'To: '||recipient || crlf ||
'' || crlf || message;
utl_smtp.helo(mail_conn, host);
utl_smtp.mail(mail_conn, senderid);
utl_smtp.rcpt(mail_conn, recipient);
utl_smtp.data(mail_conn, msg);
utl_smtp.quit(mail_conn);
Exception
When others then
Null;
END;
sendernm - Name of Sender
senderid - E Mail Id of Sender
recipient - E Mail Id of Recipient
subject - Subject
message - Message
mailsrvr - Mail Server IP Addresss/Name
|
|
|