SMTP transient error (sending mail through oracle form) [message #119693] |
Fri, 13 May 2005 15:45 |
Matloob
Messages: 39 Registered: December 2004
|
Member |
|
|
hi there i m using the following procedure
--------------------------------------------------------------
DECLARE
l_mailhost VARCHAR2(64) := 'smtp.gmail.com'; --'mail.mycompany.com';
l_from VARCHAR2(64) := 'matloob84@gmail.com';--'me@mycompany.com';
l_subject VARCHAR2(64) := 'Oracle Database Generated mail';
l_to VARCHAR2(64) := 'matloob84@hotmail.com';--'you@mycompany.com';
l_mail_conn UTL_SMTP.connection;
BEGIN
l_mail_conn := UTL_SMTP.open_connection(l_mailhost, 465);
UTL_SMTP.helo(l_mail_conn, l_mailhost);
UTL_SMTP.mail(l_mail_conn, l_from);
UTL_SMTP.rcpt(l_mail_conn, l_to);
UTL_SMTP.open_data(l_mail_conn);
UTL_SMTP.write_data(l_mail_conn, 'Date: ' || TO_CHAR(SYSDATE,
'DD-MON-YYYY HH24:MI:SS') || Chr(13));
UTL_SMTP.write_data(l_mail_conn, 'From: ' || l_from || Chr(13));
UTL_SMTP.write_data(l_mail_conn, 'Subject: ' || l_subject || Chr(13));
UTL_SMTP.write_data(l_mail_conn, 'To: ' || l_to || Chr(13));
UTL_SMTP.write_data(l_mail_conn, '' || Chr(13));
-- FOR i IN 1 .. 10 LOOP
UTL_SMTP.write_data(l_mail_conn, 'This is a test message. Line '
|| To_Char(1) || Chr(13));
-- END LOOP;
UTL_SMTP.close_data(l_mail_conn);
UTL_SMTP.quit(l_mail_conn);
END;
/
-----------------------------------------------------------------
it gave me error like this:
DECLARE
*
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 8
-----------------------------------------------------------------
i have used the same port number and the smtp adress with outlook express it works good can u plz describe me the problem
there is no problem in internet connection i m using a cabel connection
plz do reply me soon thanks take care bye
|
|
|
|
|