utl_mail procedure compiling but email not arriving

2.4k views Asked by At

I'm trying to send emails from oracle db through utl_mail package. i installed it, granted permissions to user etc. Since i dont have a comercial email server, im using a gmail account, and in order to authenticate i am running an email relay (e-mailrelay in this case, who is also running ok).

So, when i executed this procedure in pl/sql it compiled succesfuly:

begin
    UTL_MAIL.send(sender     => 'My Name "<[email protected]>"',
                  recipients => '[email protected]',
                  subject    => 'Test',
                  message    => 'It works!');
end;

i oppened the account on gmail and received tihs email saying that an app tried to log in and it was blocked. so i configured gmail to accept logins from less secured apps, sent again emails but they are not arriving. I checked in gmail last accesses and didnt find anything that could reference to oracle/plsql.

what could be the reason for the unsuccesful email sending? is there a easiest way to sent with other free email server who does not require authentication?? thanks.

1

There are 1 answers

0
KP- On

Please check if you given proper grant to current user.

Try following command and check again.

grant execute on UTL_MAIL to public;