Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

How to change the charset for e-mails (header)?

edited May 2007 in Vanilla 1.0 Help
Hi, I installed the german language pack and there are of course german umlauts like ä ö ü. This is a problem in e-mail headers. An Ä for instance is shown as Ä in the topic. My guess is that changing the charset in appg/settings.php would change the charset for the entire application and that would probably screw things up. Are there other options?


  • Options
    edited July 2006
    Take a look in \library\Framework\library\Framework\Framework.class.Email.php, specifically line 131

    This takes the charset value from the saved settings, but I suppose you can always edit this line to be a set value, ie.

    $Header .= 'Date: '.date('r')
    .'MIME-Version: 1.0'
    .'Content-transfer-encoding: 8bit'
    .'Content-type: text/plain; charset={insert german charset here}'
    .'X-Mailer: Lussumo Mailer';
  • Options
    Oh wait, this charset affects only the content. The subject must be encoded like this: Subject: =?iso-8859-1?Q?AW:_Auftragsbest=E4tigung?= It's called quoted printable. I think changing the application like this is not up to me.
  • Options
    edited May 2007
    Unfortunately, if you use UTF-8, it seems most email readers don't take kindly to the =?utf-8?q? quoted printable form. So, to bypass the problem, I introduced a new setting to be used in email subjects and changed the People.Class.UserManager accordingly. Not cute, and it doesn't solve the problem for the From and Reply-To header fields, but, for me, those are less problematic to leave without umlauts or accents.
This discussion has been closed.