Right Text Alignment [message #424181] |
Wed, 30 September 2009 08:11 |
raniams
Messages: 22 Registered: September 2008 Location: Egypt
|
Junior Member |
|
|
Please advice how to align the Arabic text to the right
Below is the Stored Procedure:
CREATE OR REPLACE procedure DMS.smail
(
from_name varchar2,
to_name varchar2,
subject varchar2,
message varchar2
)
is
l_mailhost VARCHAR2(64) := '192.168.161.33';
l_from VARCHAR2(64) := from_name;
l_to VARCHAR2(64) := to_name;
l_subject VARCHAR2(64) := subject;
l_message varchar2(4000):='';
l_mail_conn UTL_SMTP.connection;
BEGIN
l_mail_conn := UTL_SMTP.open_connection(l_mailhost, 25);
UTL_SMTP.helo(l_mail_conn, l_mailhost);
UTL_SMTP.mail(l_mail_conn, l_from);
UTL_SMTP.rcpt(l_mail_conn, l_to);
UTL_SMTP.open_data(l_mail_conn);
select qarar into l_message from qarar where ref_no=447;
UTL_SMTP.write_data(l_mail_conn, 'Date: ' || TO_CHAR(SYSDATE, 'DD-MON-YYYY HH24:MI:SS') || Chr(13));
UTL_SMTP.write_data(l_mail_conn, 'From: ' || l_from || Chr(13));
UTL_SMTP.write_data(l_mail_conn, 'Subject: ' || l_subject || Chr(13));
UTL_SMTP.write_data(l_mail_conn, 'To: ' || l_to || Chr(13));
UTL_SMTP.WRITE_DATA(l_mail_conn, 'MIME-Version: 1.0'|| UTL_TCP.CRLF);
UTL_SMTP.WRITE_DATA(l_mail_conn, 'Content-Type: text/html;charset=windows-1256;align=left'|| UTL_TCP.CRLF);
UTL_SMTP.write_data(l_mail_conn, '' || Chr(13));
-- FOR i IN 1 .. 10 LOOP
-- UTL_SMTP.write_data(l_mail_conn, 'This is a test message. Line ' || To_Char(i) || Chr(13));
-- select qarar into l_message from qarar;
-- UTL_SMTP.write_data(l_mail_conn, message|| Chr(13));
--END LOOP;
UTL_SMTP.write_raw_data(l_mail_conn, utl_raw.cast_to_raw(l_message||chr(13)));
UTL_SMTP.close_data(l_mail_conn);
UTL_SMTP.quit(l_mail_conn);
END;
/
Please find attached the output of this procedure that needs to be adjusted onto the right.
Many thanks
-
Attachment: email.jpg
(Size: 451.14KB, Downloaded 690 times)
|
|
|
|
Re: Right Text Alignment [message #424262 is a reply to message #424182] |
Thu, 01 October 2009 03:17 |
raniams
Messages: 22 Registered: September 2008 Location: Egypt
|
Junior Member |
|
|
Thanks for your reply.
But please note that there is a line in the procedure:
UTL_SMTP.WRITE_DATA(l_mail_conn, 'Content-Type: text/html;charset=windows-1256;align=left'|| UTL_TCP.CRLF);
Where the Arabic language is specified
and the alignment whether left or right-doesn't change the text alignment.
Is there anything I could add to this line of code that could align the Arabic content onto the right?
(Please note that my mail receives all Arabic email alignment to the right- the only emails that come from the called Stored procedure are placed onto the left)
[Updated on: Thu, 01 October 2009 03:20] Report message to a moderator
|
|
|