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?