Hi,
We have a function to send emails, all is working fine, but recently we received a request that the message could be in French, example (Merci d'avoir participé à l'étude).
I tried different options I found, without success. I'm not familiar with the SMTP. I got lost on the solution I found about use : utl_raw.cast_to_raw, utl_encode.base64_encode, write_raw_data, UTL_SMTP.write_data(conn, 'MIME-Version: 1.0' || UTL_TCP.crlf);
UTL_SMTP.write_data(conn, 'Content-Type: text/plain; charset=utf-8' || UTL_TCP.crlf || UTL_TCP.crlf);
UTL_SMTP.write_data(conn, 'Content-Transfer-Encoding: base64' || UTL_TCP.crlf);
This is the main part of the function: What should be included/modified.
Thanks
Gerardo.
conn:= utl_smtp.open_connection(p_email_server, port);
utl_smtp.helo( conn, p_email_server);
utl_smtp.mail(conn, p_from);
utl_smtp.rcpt(conn, r.address);
utl_smtp.open_data(conn);
utl_smtp.write_data(conn, 'Date: ' || to_char(p_timestamp, 'dd Mon yy hh24:mi:ss' ) || utl_tcp.crlf);
utl_smtp.write_data(conn, 'To: ' || p_to || utl_tcp.crlf);
utl_smtp.write_data(conn, 'From: ' || p_from || utl_tcp.crlf);
utl_smtp.write_data(conn, 'Subject: ' || p_subj || utl_tcp.crlf);
utl_smtp.write_data(conn, p_body || utl_tcp.crlf || utl_tcp.crlf);
utl_smtp.close_data(conn);
utl_smtp.quit(conn);