Current Position:Home > Outlook can not display htmldb mail message correctly

Outlook can not display htmldb mail message correctly

Update:10-11Source: network consolidation
Advertisement
We are using some applications which constructed by HTML DB. All mail messages from HTML DB applications can not be displayed correctly in Outlook, but they are displayed very well in Netscape mail client. This issue happens in both HTML DB 1.5 and 1.6. Therefore, I am not sure this is HTML DB mail package issue or outlook issue. Have anyone experienced this issue. Any suggestions are highly appreciated. Thanks in advance!
Here is a sample in our application.
We see the mail message in Outlook:
This message generated by the HTML DB Mail Package. -----=1T02D27M75MU981T02D27M75MU98
Content-Type: text/plain; charset=utf-8
<BR><FONT color=#0000ff>E-Leave System Notification for SGT China.<FONT
size=2>(Note: it is NOT an official leave system)</FONT></FONT> <HR align=left width="70%" noShade><TABLE width="80%"><TBODY><TR><TD width="20%"><FONT color=#336699>Leave User :</font></TD><TD width="50%">[email protected]</TD></TR><TR><TD><FONT
color=#336699>Formal:</font></TD><TD>No</TD></TR><TR><TD><FONT
color=#336699>Type :</font></TD><TD>Personal<BR></TD></TR><TR><TD><FONT
color=#336699>Begin Time :</font></TD><TD><FONT color=#ff0000>04-MAR-05 11:30</font></TD></TR><TR><TD><FONT color=#336699>End Time :</font></TD><TD><FONT color=#ff0000>04-MAR-05 13:30</font></TD></TR><TR><TD><FONT color=#336699>Urgent Contact :</font></TD><TD>13811512211<BR></TD></TR><TR><TD><FONT
color=#336699>Note :</font></TD><TD>Go to CCB Haidian Branch for my debit cards again :(<BR></TD></TR></TBODY></TABLE><P><A
href="http://sgt.us.oracle.com/pls/htmldb/f?p=132:101">E-Leave
System</A><BR></P
-----=1T02D27M75MU981T02D27M75MU98
Content-Type: text/html;
<BR><FONT color=#0000ff>E-Leave System Notification for SGT China.<FONT
size=2>(Note: it is NOT an official leave system)</FONT></FONT> <HR align=left width="70%" noShade><TABLE width="80%"><TBODY><TR><TD width="20%"><FONT color=#336699>Leave User :</font></TD><TD width="50%">[email protected]</TD></TR><TR><TD><FONT
color=#336699>Formal:</font></TD><TD>No</TD></TR><TR><TD><FONT
color=#336699>Type :</font></TD><TD>Personal<BR></TD></TR><TR><TD><FONT
color=#336699>Begin Time :</font></TD><TD><FONT color=#ff0000>04-MAR-05 11:30</font></TD></TR><TR><TD><FONT color=#336699>End Time :</font></TD><TD><FONT color=#ff0000>04-MAR-05 13:30</font></TD></TR><TR><TD><FONT color=#336699>Urgent Contact :</font></TD><TD>13811512211<BR></TD></TR><TR><TD><FONT
color=#336699>Note :</font></TD><TD>Go to CCB Haidian Branch for my debit cards again :(<BR></TD></TR></TBODY></TABLE><P><A
href="http://sgt.us.oracle.com/pls/htmldb/f?p=132:101">E-Leave
System</A><BR></P>
-----=1T02D27M75MU981T02D27M75MU98--
-----=1T02D27M75MU981T02D27M75MU98--
And this is my code:
declare
l_body_html varchar2(4000);
l_subject varchar2(100);
begin
l_subject := 'eLeave Notification from ' || lower(:app_user) || '@oracle.com'; l_body_html := '<BR><FONT color=#0000ff>E-Leave System Notification for SGT China.<FONT size=2>(Note: it is NOT an official leave system)</FONT></FONT> ' || '<HR align=left width="70%" noShade>' || '<TABLE width="80%"><TBODY><TR>' || '<TD width="20%"><FONT color=#336699>Leave User :</font></TD><TD width="50%">' || lower(:app_user) || '@oracle.com' || '</TD></TR><TR><TD><FONT color=#336699>Formal:</font></TD><TD>' || :P3_FORMAL || '</TD></TR><TR><TD><FONT color=#336699>Type :</font></TD><TD>' || :P3_LEAVE_TYPE || '<BR></TD></TR><TR><TD><FONT color=#336699>Begin Time :</font></TD><TD>'
|| '<FONT color=#ff0000>' || :P3_BEGIN_TIME || '</font>' ||
'</TD></TR><TR><TD><FONT color=#336699>End Time :</font></TD><TD>' || '<FONT color=#ff0000>' || :P3_END_TIME || '</font>' || '</TD></TR><TR><TD><FONT color=#336699>Urgent Contact :</font></TD><TD>'
|| :P3_CONTACT ||
'<BR></TD></TR><TR><TD><FONT color=#336699>Note :</font></TD><TD>' || :P3_NOTE || '<BR></TD></TR></TBODY></TABLE><P><A
href="http://sgt.us.oracle.com/pls/htmldb/f?p=132:101">E-Leave
System</A><BR></P>';
HTMLDB_MAIL.SEND(
P_TO => :P3_MAIL_TO,
P_FROM => '[email protected]',
P_CC => :P3_MAIL_CC,
P_BCC => :P3_MAIL_BCC,
P_BODY => l_body_html,
P_BODY_HTML => l_body_html,
P_SUBJ => l_subject);
end;
---------------------------------------------------------------------------------------------------------------

The Best Answer

Advertisement
This was not well documented, but we have improved the doc for the next relase. Essentially, you need a carriage return / line feed every 1000 characters. This is part of the SMTP spec. The package does not do this automatically for you, so try adding them yourself. You can use utl_tcp.crlf for the crlf.
Tyler