Database Utilities (MOSC)

MOSC Banner

While sending mail using UTL_SMTP, it is throwing below error.

Our product is oracle database EE 19.15 on linux OLVM 8.

We are trying to send mail using UTL_SMTP using sendgrid API key, but we struck with below error. The same is working using telnet.


ORA-29279: SMTP permanent error: 535 Authentication failed: The provided

authorization grant is invalid, expired, or revoked

ORA-06512: at "SYS.UTL_SMTP", line 57

ORA-06512: at "SYS.UTL_SMTP", line 142

ORA-06512: at "SYS.UTL_SMTP", line 223

ORA-06512: at line 16


Please find the code used to send mail.

DECLARE

c utl_smtp.connection;

v_username varchar2(100) := 'apikey';

v_password varchar2(500) := '***********';

BEGIN

c := utl_smtp.open_connection(host => 'smtp.sendgrid.net',

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center