Utl_smtp   and  problem with french language characters

Hello,
I am using utl_smtp to send email.
Here is part of the proc:
First try:
mail_conn := utl_smtp.open_connection(mailhost, 25);
utl_smtp.helo(mail_conn, mailhost);
utl_smtp.mail(mail_conn, sender);
utl_smtp.rcpt(mail_conn, recipient);
utl_smtp.open_data(mail_conn);
utl_smtp.write_data(mail_conn, 'MIME-Version: 1.0' ||CHR(13)||
CHR(10)||'Content-Type: text/plain; charset=WE8ISO8859P1' ||
CHR(13)||CHR(10)|| 'Content-Transfer-Encoding: 8bit' || CHR(13)||CHR(10) || message);
utl_smtp.close_data(mail_conn);
utl_smtp.quit(mail_conn);
This gives the output:
.... adresse par element X doit etre ....
which is wrong. It should be:
.... adressé par élément X doit être ....
I then made the following modif:
mail_conn := utl_smtp.open_connection(mailhost, 25);
utl_smtp.helo(mail_conn, mailhost);
utl_smtp.mail(mail_conn, sender);
utl_smtp.rcpt(mail_conn, recipient);
utl_smtp.open_data(mail_conn);
/*This is the modif */
utl_smtp.write_data(mail_conn, 'MIME-version: 1.0' || utl_tcp.CRLF);
utl_smtp.write_data(mail_conn, 'Content-Type: text/plain; charset=WE8ISO8859P1'||utl_tcp.CRLF);
utl_smtp.write_data(mail_conn, 'Content-Transfer-Encoding: 8bit' ||utl_tcp.CRLF);
utl_smtp.write_raw_data(mail_conn,utl_raw.cast_to_raw(utl_tcp.CRLF || message));
/* end of modif */
utl_smtp.close_data(mail_conn);
utl_smtp.quit(mail_conn);
This gives the output:
FROM: [email protected]
SUBJECT: Demande pour XYZ
TO: [email protected]
.... adressé par élément X doit être ....
which is the intended result except for the FROM, SUBJECT and To.
Of course, I can make that disappear by tweaking the modif. However, I want to know why the original procedure is not working even though I followed the utl_smtp specs.
Note:
message := '
'FROM:'||V_SENDER||CHR(13)||CHR(10)||
               'SUBJECT:'||Demande pour XYZ ' ||CHR(13)||CHR(10)||
               'TO:'||V_COURRIEL||CHR(13)||CHR(10)||CHR(13)||CHR(10)||V_CORPS_MESSAGE;
Database:
NLS_CHARACTERSET : WE8ISO8859P1
NLS_LANGUAGE : FRENCH
NLS_NCHAR_CHARACTERSET : AL16UTF16
Base : Oracle9i Release 9.0.1.3.0
Thanks

Hello,
Issue was resolved.
==============================================
PROCEDURE Send_Mail (sender IN VARCHAR2,recipient IN VARCHAR2,message IN VARCHAR2, myheader IN varchar2) IS
mailhost VARCHAR2(50) :='mail.mystmpexample.com'; -- get host name;
mail_conn utl_smtp.connection ;
BEGIN
mail_conn := utl_smtp.open_connection(mailhost, 25);
utl_smtp.helo(mail_conn, mailhost);
utl_smtp.mail(mail_conn, sender);
utl_smtp.rcpt(mail_conn, recipient);
utl_smtp.open_data(mail_conn);
utl_smtp.write_data(mail_conn, myheader || CHR(13)||CHR(10));
utl_smtp.write_data(mail_conn, 'MIME-version: 1.0' || CHR(13)||CHR(10));
utl_smtp.write_data(mail_conn, 'Content-Type: text/plain; charset=WE8ISO8859P1'|| CHR(13)||CHR(10));
utl_smtp.write_data(mail_conn, 'Content-Transfer-Encoding: 8bit' || CHR(13)||CHR(10));
utl_smtp.write_data(mail_conn, CHR(13)||CHR(10));
utl_smtp.write_raw_data(mail_conn,utl_raw.cast_to_raw(message));
utl_smtp.close_data(mail_conn);
utl_smtp.quit(mail_conn);
EXCEPTION
WHEN OTHERS THEN
utl_smtp.quit(mail_conn);
RAISE_APPLICATION_ERROR(-20000,'Impossible d''envoyer le courrier du a l''erreur suivante : ' || SQLERRM);
END; -- procedure Send_Mail
==============================================
Please note that the line:
utl_smtp.write_data(mail_conn, CHR(13)||CHR(10));
is vey important since it is going to separate the header from the message itself. This will allow the message to come out alone in the email.
Variable myheader contains the From, To and Subject and each needs to be followed by CHR(13)||CHR(10
Thanks

Similar Messages

  • Spanish Dictionary and problems with spanish special characters

    I need a spanish dictionary, with all spanish words. I know that your priority are france, spanish, germany and Italy. So, the component has problems with spanish special words, this problem was notified before.
    Have you ready something? A new version?
    Thank you for your time.

    For the special character issue, you can check the reference:
    http://forums.adobe.com/message/2430501

  • [SOLVED]Gnumeric and problem with non-US characters

    I am trying here to get Gnumeric to recognize the UTF-8 or ISO-8859-15 characters, but there even doesn't seem to be any locale option in menus? Googling didn't show up anything spectacular.
    I tried this:
    LC_ALL=fr_FR gnumeric &
    but got an error from command line:
    (gnumeric:7559): Gtk-WARNING **: Locale not supported by C library.
            Using the fallback 'C' locale.
    And everything is still in the US format, even how dates are represented.

    Thanks, rdoggsv - I got the menus in my language in gnumeric and as a bonus - I got the euro sign to work with your advice
    But still I don't have characters like ä,ö,õ,ü at gnumeric. I get them nicely at kwrite, konsole, konqueror, openoffice and opera.
    This missing chars - thing seems to be Gnome-specific. For example I can't get those chars visible at Gimp, graveman and galculator. But in Abiword the chars are visible in the editor's text editing field but not when for example I try to save a file.

  • Problems with Polish Language Characters

    I'm using version 5.5 of Output Designer.
    I've included Arial CE as a softfont in designer.  I can successfully display polish characters in a text field on my template, for example Wysyłka.
    When I run a Test Presentment, the text fields from my template still display properly in the resulting PDF file.
    However, the polish characters from the merged data in an fnf file get substituted with other characters.
    For example, in the fnf file I have
    ^Field zloty
    dwadzie
     ścia dziewięć tysięcy dziewięćset pięćdziesiąt siedem
    which becomes
    dwadzie               oecia dziewiêæ tysiêcy dziewiêæset piêædziesi¹t siedem
    in the PDF. 
    I have the field set to Arial CE font.  I've also tried running the Presentment with my Windows set to Polish but it didn't help.
    Any suggestions would be appreciated.
    Lynne
    Message was edited by: LynneWilson
    (Sorry....the example Polish text lines should all be on just two lines, but everytime I post it gets changed!)

    Unfortuantely when it comes to fonts and such, I am more of a Mac guy in that regard and have never had to deal with font issues on any of the Windows machines I have use or currently use. Perhaps a Windows guru will come around soon and assist?
    I know that when I put in characters that my Mac displays properly and then take that to a PC I often get squares, like the ones below in my system info. On my Mac those show up as little Apple logos. On my work PC they are just squares. Which is why I suspect a font issue.
    Patrick

  • Hello, I'm a french Photoshop CC user. My one is in english language, and I would like to work with french language. How can I do to have french language ?

    Hello, I'm a french Photoshop CC user. My one is in english language, and I would like to work with french language. How can I do to have french language ?

    In the CC Desktop app, click the gear > Preferences > App tab > choose Application Language, then install Photoshop CC
    Once the install finishes, Photoshop Preferences > Interface > UI Language, change to French, Restart Photoshop.

  • Problem with "farsi" language . Characters is separate.

    android 2.2 . samsung galaxy s i9000 . problem with "farsi" language . Characters is separate. like this :.
    . س ل ا م . ا ی ن ج و ر ی .
    please help.

    fennec-4.0b2.multi.eabi-arm

  • I have a problem with other languages with Firefox 3.6.6 and Serverlight

    I acquired the problem with other languages in Serverlight when I update my Firefox to 3.6.6
    It seems that only English chart is working properly. I have WinXPprof and have no any other additionally added languages programs. But I use every day Cyrillic and Greek charts and they are working in others applications except on Serverlight. I do thank you for any coming help.
    == This happened ==
    Every time Firefox opened
    == After updating my Firefox to 3.6.6. version

    Do not reply to engineer. It is a phishing scam.

  • Reading a text file with foreign language characters

    I'm trying to convert foreign language characters to English looking characters.  I have code that works, but only if I hard code the string with foreign language characters and pass it to the function. I cannot figure out how to get my program to read
    in the foreign characters from my file, they come in as garbage. 
    Since the function works when I pass a hard coded string to it, I'm pretty sure the problem is the way I have the Streamreader set up, it's just not reading the characters correctly...
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    Dim FileRdr As StreamReader = New StreamReader "m:\test\charReplace.txt", System.Text.Encoding.UTF7)
    Dim ReplaceWrtr As StreamWriter ReplaceWrtr = System.IO.File.CreateText("M:\test\CharReplaceOut.txt")
    Do While FileRdr.Peek() >= 0
    Dim currentRec As String = FileRdr.ReadLine
    removeAccent(currentRec)
    ReplaceWrtr.WriteLine(currentRec)
    Loop
    ReplaceWrtr.Close()
    End Sub
    'Replace foreign language characters with English characters
    Function removeAccent(ByVal myString As String)
    Dim A As String = "--"
    Dim B As String = "--"
    Const AccChars As String = "ŠŽšžŸÀÁÂÃÄÅÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖÙÚÛÜÝàáâãäåçèéêëìíîïðñòóôõöùúûüýÿ"
    Const RegChars As String = "SZszYAAAAAACEEEEIIIIDNOOOOOUUUUYaaaaaaceeeeiiiidnooooouuuuyy"
    For i As Integer = 1 To Len(AccChars)
    A = Mid(AccChars, i, 1)
    B = Mid(RegChars, i, 1)
    myString = Replace(myString, A, B)
    Next
    removeAccent = myString
    End Function
    I know that removing the accent changes the meaning of the word, but this is what the user wants so it's what I need to do. 
    Any help is greatly appreciated!! :)
    Thanks!
    Joni

    Finally got it to work.  I had to remove the first 5 characters from the replacement string (ŠŽšžŸ), couldn't find encoding that would handle these, and to be honest, I didn't really need them.  The important ones are still there, was probably
    just overkill on my part.
    UTF7 worked for the rest...
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    Dim FileRdr As StreamReader = New StreamReader("m:\test\charReplace.txt", System.Text.Encoding.UTF7)
    Dim ReplaceWrtr As StreamWriter
    ReplaceWrtr = System.IO.File.CreateText("M:\test\CharReplaceOut.txt")
    Do While FileRdr.Peek() >= 0
    Dim currentRec As String = FileRdr.ReadLine
    removeAccent(currentRec)
    ReplaceWrtr.WriteLine(currentRec)
    Loop
    ReplaceWrtr.Close()
    End Sub
    'Replace foreign language characters with english characters
    Function removeAccent(ByRef myString As String)
    Dim A As String = "--"
    Dim B As String = "--"
    Const AccChars As String = "ÀÁÂÃÄÅÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖÙÚÛÜÝàáâãäåçèéêëìíîïðñòóôõöùúûüýÿ"
    Const RegChars As String = "AAAAAACEEEEIIIIDNOOOOOUUUUYaaaaaaceeeeiiiidnooooouuuuyy"
    For i As Integer = 1 To Len(AccChars)
    A = Mid(AccChars, i, 1)
    B = Mid(RegChars, i, 1)
    myString = Replace(myString, A, B)
    Next
    removeAccent = myString
    End Function
    Thanks for all your help!  Greatly appreciated :)
    -Joni

  • Transfer/Reply to emails with french special characters - BB 9360

    Hi,
    I've got a problem when I reply/transfer to mails with french special characters (such as "é" "è" "ç" etc..) => all the special characters are replaced with strange characters such as chinese letters or others.
    No problem when I send an email with those same characters, it appears only when transfer or reply and only on special characters contained in the original mail I transfer/reply to.
    is there a way to solve this issue?
    thanks

    while pressing the 'e' key, scroll your trackball side to side, you will find the various e variations.
    You can do that with most keys to get special characters.
    1. If any post helps you please click the below the post(s) that helped you.
    2. Please resolve your thread by marking the post "Solution?" which solved it for you!
    3. Install free BlackBerry Protect today for backups of contacts and data.
    4. Guide to Unlocking your BlackBerry & Unlock Codes
    Join our BBM Channels (Beta)
    BlackBerry Support Forums Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • Problem with Icelandic special characters on Mac

    Hello
    I am working on a Flash publication for students, and I want it to run on Mac as well as PC. Everything goes fine, except a problem with three special characters in my language, Icelandic. I am working on a registration and login page where I am using text boxes and text input boxes. Everything looks correct on PC, but on Mac the characters Þ Ð Ý are lost.
    I have tried different fonts etc.
    Any idea what is wrong?
    Jónas Helgason

    Hello Jónas,
    Did you ever figure this out ?
    I have a similar problem except only with two letters (both upper and lower case).  These two Icelandic letters can't be entered into a Flex TextInput box in the Flex apps I am creating when they are loaded on a Mac.  The letters are known as &Eth, &eth, &Thorn and &thorn in HTML terminology.  Typing these characters on the keyboard results in the following:  { [ ? /
    However I can copy the characters in question from some other app like TextEdit and paste them into a TextInput box in my Flex app and all is well, they show up correctly.
    This happens regardless of the Mac browser used and the Flash plugin version used (have tried both 9 and 10) and also happens in the standalone Flash Player application.
    Does anyone have any idea how to fix this or is this a bug in Flash Player ?  This is really annoying as it makes text input into Flex apps on Icelandic Macs very difficult.
    There must be something wrong with the mapping of keyboard key codes into character codes on the Mac that is causing this.
    Btw, I just heard from a friend that this problem does not exist in MacOS 10.6.  I am running 10.4 and have tested this on 10.5 and it exists on both of those OS versions.
    Rgds,
    Hordur Thordarson
    Lausn hugbunadur
    http://lausn.is

  • Problems with non-ASCII characters on Linux Unit Test Import

    I found a problem with non-ASCII characters in the Unit Test Import for Linux.  This problem does not appear in the Unit Test Import for Windows.
    I have attached a Unit Test export called PROC1.XML  It tests a procedure that is included in another attachment called PROC1.txt. The unit test includes 2 implementations.  Both implementations pass non-ASCII characters to the procedure and return them unchanged.
    In Linux, the unit test import will change the non-ASCII characters in the XML file to xFFFD. If I copy/paste the the non-ASCII characters into the Unit Test after the import, they will be stored and executed correctly.
    Amazon Ubuntu 3.13.0-45-generic / lubuntu-core
    Oracle 11g Express Edition - AL32UTF8
    SQL*Developer 4.0.3.16 Build MAIN-16.84
    Java(TM) SE Runtime Environment (build 1.7.0_76-b13)
    Java HotSpot(TM) 64-Bit Server VM (build 24.76-b04, mixed mode)
    In Windows, the unit test will import the non-ASCII characters unchanged from the XML file.
    Windows 7 Home Premium, Service Pack 1
    Oracle 11g Express Edition - AL32UTF8
    SQL*Developer 4.0.3.16 Build MAIN-16.84
    Java(TM) SE Runtime Environment (build 1.8.0_31-b13)
    Java HotSpot(TM) 64-Bit Server VM (build 25.31-b07, mixed mode)
    If SQL*Developer is coded the same between Windows and Linux, The JVM must be causing the problem.

    Set the System property "mail.mime.decodeparameters" to "true" to enable the RFC 2231 support.
    See the javadocs for the javax.mail.internet package for the list of properties.
    Yes, the FAQ entry should contain those details as well.

  • Problems with Greek accented characters

    After the update to AIR 2.0.2 I cannot input into any application greek with accented characters.
    Tried TweetDeck and Twhirl and neither work (used to before the update)
    Is this a bug or it needs some configuration
    I am working on Fedora13 but heard the same problem reported on Ubuntu.
    Have not tried on MS Windows or MacOSX

    Hi,
    I'm using Adobe AIR 2.0.3 on Windows machine. I wrote an app in Aptana Studio (build: 2.0.5.1278522500) with ExtJS library and I found the problem with polish national characters like ż and Ż (all the other national characters like ą, ę, ń are possible to input).
    In order to reproduce, here you have the sample code in ExtJS:
    http://dev.sencha.com/deploy/dev/examples/form/anchoring.html
    As you will see - it is possible to input ż and Ż in text fields.
    Now, use the same code to build AIR applicaton and then run the application. It is not possible to input those characters in Air window. Right Alt+z acts like undo operation - it removes last entered text. All the other characters work fine.
    Here is the code I used:
    <html>
        <head>
            <title>New Adobe AIR Project</title>
            <link rel="stylesheet" type="text/css" href="lib/ext/resources/css/ext-all.css" />
            <link rel="stylesheet" type="text/css" href="lib/ext/air/resources/ext-air.css" />
            <script type="text/javascript" src="lib/air/AIRAliases.js"></script>
            <script type="text/javascript" src="lib/ext/adapter/ext/ext-base.js"></script>
               <script type="text/javascript" src="lib/ext/ext-all.js"></script>
            <script type="text/javascript" src="lib/ext/air/ext-air.js"></script>
            <script type="text/javascript">
            Ext.onReady(function(){
        var form = new Ext.form.FormPanel({
            baseCls: 'x-plain',
            labelWidth: 55,
            defaultType: 'textfield',
            items: [{
                fieldLabel: 'Send To',
                name: 'to',
                anchor:'100%'  // anchor width by percentage
                fieldLabel: 'Subject',
                name: 'subject',
                anchor: '100%'  // anchor width by percentage
                xtype: 'textarea',
                hideLabel: true,
                name: 'msg',
                anchor: '100% -53'  // anchor width by percentage and height by raw adjustment
        var window = new Ext.Window({
            title: 'Resize Me',
            width: 500,
            height:300,
            minWidth: 300,
            minHeight: 200,
            layout: 'fit',
            plain:true,
            bodyStyle:'padding:5px;',
            buttonAlign:'center',
            items: form,
            buttons: [{
                text: 'Send'
                text: 'Cancel'
        window.show();
            </script>
        </head>
        <body>
        </body>
    </html>
    Is it possible to input those characters or is there a workaround for this (disable undo operation or so) ?
    I really appreciate any help.
    Kind regards,
    Marcin.

  • Flash Player 9 problem with Chinese language

    Flash Player 9 problem with Chinese language
    I have developed a course in flash which goes in to different
    languages like Spanish, Chinese, Portuguese, Japanese...
    I have used flash for developing the course. I have tested it
    for Chinese It looks great on flash player 6,7 and 8 but I am
    shocked to see that it give some garbage value in flash player 9.
    Don’t know this is a bug of player or what?
    Flash Player 9 Problem
    Flash Player 9 problem with Chinese language
    Flash Player
    9 problem with Chinese language

    Thanks for the helpful posting. I came searching here for advice because I could not get my Flash Player 9 installation to succeed using the trouble-shooting information provided on the Adobe web site, and from experience I have come to know that my best resource in trouble-shooting is to seek the help of other Mac users.
    In following your instructions I discovered that "Enable Flash" was not checked in my preferences, so that was definitely part of the problem. However, I still could not get Flash Player 9 to work, so after doing a Google search I found a posting on Version Tracker (under feedback at the bottom of this page: http://www.versiontracker.com/dyn/moreinfo/macosx/11622 ) that provided the last little bit of instruction I needed to get Flash Player 9 to function properly.
    Before attempting to install Flash Player 9 I had used Adobe's uninstaller to uninstall previous versions, as instructed on the Adobe website. However, AFTER repairing my disk permissions, I needed to restart the computer and run the uninstaller again. After uninstalling I restarted once more, ran the installer and, VOILA!, finally Flash Player 9 worked as it should.
    PowerBook (1.5 GHz PowerPC G4)   Mac OS X (10.4.8)  

  • Any new  about updating lion to 10.7.4 and problems  with bluetooth devices  like Bose Soundlink Bluetooth Speaker?

    Any new  about updating lion to 10.7.4 and problems  with bluetooth devices  like Bose Soundlink Bluetooth Speaker?

    Monroe
    Just in the moment i updated to lion 10.7.4  my Bose Soundlink Bluetooth  stop working as  good as it was. I´m gonna try the update in the Bose  web page. I hope  it works

  • Problems with French Characters in Page Title

    Here is the problem
    When using Duplicate Page and trying to set page titles with french characters (or other non standard characters for that matter such as qoutes) The resulting output does not display correctly.
    I thought a work around would be to us the HTML escape codes in the title dialog when creating the page  however it appears that Incontext then goes and attemps to escape the ampersand part of the escape code during save.
    so for instance when trying to set a page title such as Whistler Live! prépare la scène using the following escaped version
    Whistler Live! pr&eacute;pare la sc&egrave;ne
    The resulting HTML saved from incontext looks like this
    Whistler Live! pr&amp;eacute;pare la sc&amp;egrave;ne
    and the title does not display correctly.
    Incontext sees the & which is page of the HTML escape code and they automatically replaces that with &amp;
    How the heck can we set HTML Special characters in our page titles - any ideas?

    Hi Corey
    To answer your questions I am on windows 7 IE 8 and also tried in firefox 3.6
    backend is windows 2000 / IIS 6 / Coldfusion 8
    I am able to enter the characters in the dialog box but during the save they are altered
    I created a basic test page with nothing but the following code
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xmlns:ice="http://ns.adobe.com/incontextediting">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>test</title>
    </head>
    <body>
    <div ice:editable="*" >
      <p>Test test</p>
    </div>
    </div>
    <script src="/includes/ice/ice.js" type="text/javascript"></script>
    </body>
    </html>
    saved it as test-characters.cfm (coldfusion page) and tested it out
    problem was still there however when I save the page as a .html file and test it out the problem is no longer present
    So the problem seems to only occur when using .cfm pages (even if there is no cf code on them)
    I am going to send you a private message with access to my test pages in case your inclined to take a look
    Thanks for you help so far

Maybe you are looking for

  • Mutilple users on the one apple account

    I have recently upgraded my daughters iphones to the latest software version.  We all use the same apple account so that we can share itunes apps, songs and so on.  It seems to have confused all of our contact details.  When my daughters texts me it

  • InDesign CS3 spins and crashes

    I can't work for two minutes in InDesign now without it going into Lollipop Land and then crashing. Do I just need to trash my prefs or something?

  • OPMN unable to start EMAGENT Process now. (till yesterday it was working fi

    Hi Experts, Today when I started OPMN my OID server was up but EMAGENT is down. (till yesterday it was working fine). I even run, opmnctl startproc process-type=EMAGENT but could not start EMAGENT. Below are the log content. Help Appreciated. cat ema

  • PSE always crash when Open

    Hi Guys, Hope someone can enlighten me how to solve the issue. Below is the error log. Thank you. Process:         Adobe Photoshop Elements [229] Path:            /Applications/Adobe Photoshop Elements 9/Adobe Photoshop Elements.app/Contents/MacOS/Ad

  • Increase the performance of fileadapter

    Hi, can any body tell me how to increase the performance of the FILEADAPTER & DBADAPTER? Regards, Krishna.