Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Cannot send e-mails from database to yahoo ?

761559Nov 17 2011 — edited Nov 18 2011
Dears,

I am trying to send emails form database to my outlook mail as below

CREATE OR REPLACE PROCEDURE sendmails
(pSend VARCHAR2, pRec VARCHAR2, pSub VARCHAR2, pMesg VARCHAR2) IS
mailhost CONSTANT VARCHAR2(30) := '10.0.1.155';
crlf CONSTANT VARCHAR2(2):= CHR(13) || CHR(10);
mesg VARCHAR2(1000);
mail_conn utl_smtp.connection;
BEGIN
mail_conn := utl_smtp.open_connection(mailhost,25);
mesg := 'Date: ' ||TO_CHAR( SYSDATE, 'dd Mon yy hh24:mi:ss') || crlf ||'From: <'|| pSend ||'>' || crlf ||'Subject: '|| pSub || crlf ||'To: '||pRec || crlf || '' || crlf ||pMesg;
utl_smtp.helo(mail_conn, mailhost);
utl_smtp.mail(mail_conn, pSend);
utl_smtp.rcpt(mail_conn, pRec);
utl_smtp.data(mail_conn, mesg);
utl_smtp.quit(mail_conn);
EXCEPTION
WHEN OTHERS THEN
dbms_output.put_line (sqlerrm);
END sendmails;

I specified my outlook email in the procedure execution and the procedure successfully send message to my outlook email.
But when i specified my yahoo email, the procedure could not send mail to my yahoo email ! , it gave me ORA-29279: SMTP permanent error: 550 5.7.1 Unable to relay.

Please, can you help me in this issue ?

Thanks & regards,,
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 16 2011
Added on Nov 17 2011
4 comments
3,560 views