UTL_MAIL shows character set in email client
770225Jan 27 2011 — edited Sep 21 2012Hello,
Database: Oracle Database 10g Enterprise Edition Release 10.1.0.3.0
OS: Red Had Enterprise Linux (version 3)
I'm trying to use the UTL_MAIL package to send an email and the actual mail sending works fine. However on the client side the database character set (WE8ISO8859P1) is displayed in the "From:" field and it's also displayed in the "Subject:" field (along with the actual email address/subject). Can someone please let me know why this is happening and how I fix it?
The code I use is:
<font face="Courier New" size="2">
<font color = "maroon">exec</font> <font color = "maroon">utl_mail</font><font color = "silver">.</font><font color = "maroon">send</font><font color = "maroon">(</font> <font color = "maroon">sender</font> <font color = "silver">=></font> <font color = "red">'"Database Check" <oracle_test_db@company.com>'</font><font color = "silver">,</font>
<font color = "maroon">recipients</font> <font color = "silver">=></font> <font color = "red">'"Oracle DBA" <my.address@company.com>'</font><font color = "silver">,</font> <font color = "maroon">
<br>subject</font> <font color = "silver">=></font><font color = "red">'test email subject'</font><font color = "silver">,</font> <font color = "maroon">
<br>message</font> <font color = "silver">=></font> <font color = "red">'message body text'</font><font color = "silver">,</font> <font color = "maroon">
<br>mime_type</font> <font color = "silver">=></font><font color = "red">'text/plain charset=us-ascii;'</font><font color = "maroon">)</font><font color = "silver">;</font>
</font>
Here's a screenshot of how the email appears on the client-side (Novell GroupWise. Outlook 2007 also displays it the same way). Please note I've blanked out the recipients name (which is displayed correctly, without the character set).
http://oi53.tinypic.com/25usgme.jpg
So why is the character set displayed? I've tried various combinations of using double-quotes and single quotes to no avail. Also the email is displayed perfectly fine if I use the old UTL_SMTP package!
Please help!
Thanks!
Edited by: feersum_endjinn on 27-Jan-2011 03:00