Skip to Main Content

SQL & PL/SQL

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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Getting error while sending email through sendgrid API key.

User_K826PMar 31 2021 — edited Mar 31 2021

I have a procedure which sends email using sendgrid smtp server. Sendgrid has provided us the username and password. When we use these credentials, the email works fine. But sendgrid has informed us that they are about to discard our username and password. Instead they have provided us new username and an api key. The username is 'apikey' and the password is 69 character long string. It is actually encoded string. When I use these credentials, I get error 'ORA-29278 SMTP transient error: 421 Service not available. Please help as I won't be able to send email to our customers. Here is the piece of code in which we provide username and password.

utl_smtp.command(objConnection,utl_raw.cast_to_varchar2(utl_encode.base64_encode(utl_raw.cast_to_raw(username))));
utl_smtp.command(objConnection,utl_raw.cast_to_varchar2(utl_encode.base64_encode(utl_raw.cast_to_raw(password))));

Comments
Post Details
Added on Mar 31 2021
7 comments
1,256 views