2 Replies Latest reply: Apr 17, 2009 3:07 AM by 691542 RSS

    subject in utl_smtp

    691542
      Hi

      we use utl_smtp to send html emails with special characters as 'ěřšý' and it works fine. can me anybody tell if it is possible to use this characters in the email subject?

      we use
      utl_smtp.write_data(c, 'MIME-version: 1.0' || utl_tcp.crlf);
      utl_smtp.write_data(c, 'Content-Type: text/html; charset=windows-1250;' ||utl_tcp.crlf);
      .
      .
      .
      utl_smtp.write_raw_data(c, utl_raw.cast_to_raw('Subject: '|| 'Další pokus řekněme.'));
      -- utl_smtp.write_data(c, 'Subject: '|| 'Další pokus řekněme.', 'MIME=("EE8MSWIN1250"' );
      -- utl_smtp.write_raw_data(c, utl_raw.cast_to_raw(CONVERT('Subject: '|| 'Další pokus řekněme.' ,'EE8MSWIN1250')));

      can somebody help me to solve it?

      thanks
      jura
        • 1. Re: subject in utl_smtp
          Marwim
          Hello Jura,

          the Subject always has to be encoded. Have a look at UTL_ENCODE.MIMEHEADER_ENCODE
          http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/u_encode.htm#i999461

          To find out about this it also might be helpful to view the raw text of a mail sent from your personal mail client (Most clients can, but I think Outlook cannot). The subject line should look similar to
          Subject: =?iso-8859-1?Q?Fahrplan=E4nderungen_KBS_930_(M=FCnchen_-_Landshut_-_Regen?= =?iso-8859-1?Q?sburg)?=
          For a german subject line "Fahrplanänderungen KBS 930 München - Landshut - Regensburg"

          Regards
          Marcus
          • 2. Re: subject in utl_smtp
            691542
            thanks for your help.

            papko