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!

UTL_SMTP.command AUTH PLAIN

pnoskoNov 3 2012 — edited Nov 4 2012
I'm trying to send an email and need to authenticate to my mail server using AUTH PLAIN. I'm using the following to encode my authentication string, substituting my user_id and password, or course.
l_auth_string := UTL_RAW.cast_to_varchar2(UTL_ENCODE.base64_encode(UTL_RAW.cast_to_raw('user_name'||chr(0)||'user_name'||chr(0)||'password')));
I was unable to authenticate this way, and used DBMS_OUTPUT to see the string. It contains a CHR(13) CHR(10) sequence near the end of the string, breaking it into two lines (visually). If I remove these two characters and send the combined strings, I am able to authenticate.

Any idea what's going on here?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 2 2012
Added on Nov 3 2012
4 comments
791 views