Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

UTL_MAIL shows character set in email client

770225Jan 27 2011 — edited Sep 21 2012
Hello,

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>&nbsp;<font color = "maroon">utl_mail</font><font color = "silver">.</font><font color = "maroon">send</font><font color = "maroon">(</font>&nbsp;<font color = "maroon">sender</font>&nbsp;<font color = "silver">=&gt;</font>&nbsp;<font color = "red">'&quot;Database&nbsp;Check&quot;&nbsp;<oracle_test_db@company.com>'</font><font color = "silver">,</font>

<font color = "maroon">recipients</font>&nbsp;<font color = "silver">=&gt;</font>&nbsp;<font color = "red">'&quot;Oracle&nbsp;DBA&quot;&nbsp;<my.address@company.com>'</font><font color = "silver">,</font>&nbsp;<font color = "maroon">
<br>subject</font>&nbsp;<font color = "silver">=&gt;</font><font color = "red">'test&nbsp;email&nbsp;subject'</font><font color = "silver">,</font>&nbsp;<font color = "maroon">
<br>message</font>&nbsp;<font color = "silver">=&gt;</font>&nbsp;<font color = "red">'message&nbsp;body&nbsp;text'</font><font color = "silver">,</font>&nbsp;<font color = "maroon">
<br>mime_type</font>&nbsp;<font color = "silver">=&gt;</font><font color = "red">'text/plain&nbsp;charset=us-ascii;'</font><font color = "maroon">)</font><font color = "silver">;</font>&nbsp;
</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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 19 2012
Added on Jan 27 2011
9 comments
1,316 views