Home » Developer & Programmer » Forms » SMTP transient error (sending mail through oracle form)
SMTP transient error (sending mail through oracle form) [message #119693] Fri, 13 May 2005 15:45 Go to next message
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
Re: SMTP transient error (sending mail through oracle form) [message #119731 is a reply to message #119693] Sat, 14 May 2005 06:05 Go to previous messageGo to next message
Frank
Messages: 7901
Registered: March 2000
Senior Member
google for the complete error message. (ORA-29278: SMTP transient error: 421 Service not available) This might give you some hints and tips to track down the actual error.

hth
Re: SMTP transient error (sending mail through oracle form) [message #119800 is a reply to message #119693] Sun, 15 May 2005 20:28 Go to previous message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Have you been able to get mail to work for any other Form or procedure/function in your installation?

David
Previous Topic: Help me!
Next Topic: Form 6i & Report 6i Sample Forms & Reports
Goto Forum:
  


Current Time: Fri Sep 20 01:33:37 CDT 2024