UTL_SMTP and Arabic language
476773May 17 2011 — edited Jul 12 2012Dear Sir, Ma'am;
i'm using this code to send an email from oracle
-------------------
create or replace procedure send_email(SendorAddress Varchar2,ReceiverAddress varchar2,EmailServer VARCHAR2,PORT VARCHAR2,mesgd_body VARCHAR2,SUBJECT VARCHAR2) is
conn UTL_SMTP.CONNECTION;
crlf VARCHAR2( 2 ):= CHR( 13 ) || CHR( 10 );
mesg VARCHAR2( 4000 );
mesg_body varchar2(4000);
BEGIN
conn:= utl_smtp.open_connection( EmailServer, Port );
utl_smtp.helo( conn, EmailServer );
utl_smtp.mail( conn, SendorAddress);
utl_smtp.rcpt( conn, ReceiverAddress );
mesg:=
'Date: '||TO_CHAR( SYSDATE, 'dd Mon yy hh24:mi:ss' )|| crlf ||
'From:'||SendorAddress|| crlf ||
'Subject: ' || chr(140) || chr(140) || chr(140) ||crlf ||
'To: '||ReceiverAddress || crlf ||
'' || crlf ||mesg_body||'';
utl_smtp.data(conn, 'MIME-Version: 1.0' ||CHR(13)|| CHR(10)||'Content-type: text/html' || CHR(13)||CHR(10)||mesg);
utl_smtp.Quit(conn);
END;
/
-------------------
and it's work fine but when i try to send email contains arabic words the email appears like this ( ??????? )
any help please ?