Bad recipient address [message #551583] |
Thu, 19 April 2012 08:55  |
 |
ramnath1989
Messages: 48 Registered: November 2011 Location: india
|
Member |
|
|
hi friends ,
i have a Procedure to Send mail [ i ll copied the code below ]
If i run procedure from my test database it works fine
while giving the recipient address as
xyz@gmail.com , temp@gmail.com [comma seperated mail address ]
if i run the same procedure from my client system it shows the error
'ORA -29279 :SMTP permanent error :501 5.1.3 Bad recipient address syntax'
it works fine while giving single recipient ex [xyz@gmail.com]
code for the procedure is
-----------
CREATE OR REPLACE PROCEDURE send_mail_test(p_sender IN VARCHAR2,
p_recipient IN VARCHAR2,
msg_cc1 varchar2,
p_message IN VARCHAR2,
p_subject IN VARCHAR2) AS
l_mailhost VARCHAR2(255) := 'xyxx.com';
l_mail_conn utl_smtp.connection;
ll_timeout PLS_INTEGER DEFAULT 15;
-- smtp_host VARCHAR2(256) := '192.168.35.203';
smtp_host VARCHAR2(256) := '192.168.45.12';
BEGIN
l_mail_conn := utl_smtp.open_connection(smtp_host, 25, ll_timeout);
utl_smtp.helo(l_mail_conn, l_mailhost);
utl_smtp.mail(l_mail_conn, p_sender);
utl_smtp.rcpt(l_mail_conn, p_recipient);
utl_smtp.rcpt(l_mail_conn, msg_cc1);
utl_smtp.open_data(l_mail_conn);
utl_smtp.write_data(l_mail_conn,
'From' || ': ' || p_sender || utl_tcp.crlf);
utl_smtp.write_data(l_mail_conn,
'To' || ': ' || p_recipient || utl_tcp.crlf);
utl_smtp.write_data(l_mail_conn, 'CC' || ': ' || msg_cc1 || utl_tcp.crlf);
utl_smtp.write_data(l_mail_conn,
'Subject' || ': ' || p_subject || utl_tcp.crlf);
utl_smtp.write_data(l_mail_conn,
'Content-Type: text/html' || utl_tcp.crlf);
utl_smtp.write_data(l_mail_conn, utl_tcp.crlf || p_message);
utl_smtp.close_data(l_mail_conn);
utl_smtp.quit(l_mail_conn);
END;
---
|
|
|
|
|
|
|
|
|
|
|
Re: Bad recipient address [message #551748 is a reply to message #551649] |
Fri, 20 April 2012 07:32   |
ThomasG
Messages: 3212 Registered: April 2005 Location: Heilbronn, Germany
|
Senior Member |
|
|
It has NOTHING to to with the database. It MIGHT be that the mail server (contrary to SMTP specification) accepts comma separated values in one case, and not in the other case.
It might of course also be that in the case that "seems to be working" the mail server just quietly drops the mails, while the other mail server returns an error message.
Again, it has NOTHING to do with the database or Oracle, the difference is on the MAIL SERVER side.
|
|
|
|
|