Unable to send mail thru PL/SQL [message #247823] |
Wed, 27 June 2007 05:36 |
kajarindam
Messages: 2 Registered: June 2007
|
Junior Member |
|
|
Hi,
I am trying to send email by using the following procedure
l_mail_conn := utl_smtp.open_connection(l_vr_mailhost, 25);
utl_smtp.helo(l_mail_conn,l_vr_mailhost);
utl_smtp.mail(l_mail_conn,pi_sender);
utl_smtp.rcpt(l_mail_conn, pi_recipient);
utl_smtp.open_data(l_mail_conn);
utl_smtp.write_data(l_mail_conn, 'From: "' || pi_sender || '" <' || pi_sender || '>' || utl_tcp.crlf);
utl_smtp.write_data(l_mail_conn, 'To: "' || pi_recipient || '" <' || pi_recipient || '>' || utl_tcp.crlf);
utl_smtp.write_data(l_mail_conn, 'Subject: ' || pi_subject || utl_tcp.crlf);
utl_smtp.write_data(l_mail_conn, utl_tcp.crlf);
utl_smtp.write_data(l_mail_conn, pi_message || utl_tcp.crlf);
utl_smtp.write_data(l_mail_conn, utl_tcp.crlf);
utl_smtp.close_data(l_mail_conn);
utl_smtp.quit(l_mail_conn);
But while running it I am getting the following error for sending few mails
ORA-29279: SMTP permanent error: 553 header syntax error
I have checked that for the mail Id I am sending the mail is valid .Please help me.
Thanks
Kajarindam
|
|
|
|