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))));