How to Send email through oracle [message #71295] |
Thu, 10 October 2002 05:16 |
msh
Messages: 11 Registered: July 2002
|
Junior Member |
|
|
Hi All,
I have run all the necessary scripts for this.But after running thsi procedure i am getting thsi error.
Declare
SendorAddress Varchar2(30) := 'munish_blr@hotmail.com';
ReceiverAddress varchar2(30) := 'munishmsh@rediffmail.com';
EmailServer varchar2(30) := 'hotmail.com';
Port number := 25;
conn UTL_SMTP.CONNECTION;
crlf VARCHAR2( 2 ):= CHR( 13 ) || CHR( 10 );
mesg VARCHAR2( 4000 );
mesg_body varchar2(4000);
BEGIN
conn:= utl_smtp.open_connection( EmailServer, Port );
utl_smtp.helo( conn, EmailServer );
utl_smtp.mail( conn, SendorAddress);
utl_smtp.rcpt( conn, ReceiverAddress );
mesg:=
'Date: '||TO_CHAR( SYSDATE, 'dd Mon yy hh24:mi:ss' )|| crlf ||
'From:'||SendorAddress|| crlf ||
'Subject: Mail Through ORACLE Database' || crlf ||
'To: '||ReceiverAddress || crlf ||
'' || crlf ||
' This is Mail from Oracle Database By Using UTL_SMTP Package'||crlf||'It is very easy
configure Tell me if you face any problems' ;
utl_smtp.data( conn, mesg );
utl_smtp.quit( conn );
END;
/
After running thsi pl/sql block i am getting this error.
*
ERROR at line 1:
ORA-29278: SMTP transient error: 421 Service not available
ORA-06512: at "SYS.UTL_SMTP", line 17
ORA-06512: at "SYS.UTL_SMTP", line 96
ORA-06512: at "SYS.UTL_SMTP", line 138
ORA-06512: at line 11
Would anyone plz let me knwo the cause of problem and also how to rectify it.Plz its urgent.
Thanks
./mk
|
|
|
|
|
|