[TYPO3-dev] direct_mail / t3lib_htmlmail sender name
Bernhard Kraft
kraftb at think-open.at
Wed Mar 31 23:22:20 CEST 2010
Steffen Ritter wrote:
> But the sendername is not encrypted correctly, seems there is an
> "double" encryption...
>
> it's like "Oberflächenschutz".
Hey!
Usually this should not occur. The from_name/from_email parameter are
added to the mail header using the "add_header" method:
-------------
$this->add_header('From: '.$this->from_name.' <'.$this->from_email.'>');
-------------
The add_header() method takes care of setting the value to contain a
string of current charset:
---------------
$parts[1] = t3lib_div::encodeHeader($parts[1], $enc, $this->charset);
---------------
Your string is an utf-8 string shown in it's is-8859-1 representation.
Try to inspect the "$this->charset" variable if it is set to "utf-8".
Also have a look at the "from_name" variable if it is already encoded
twice when you pass it to t3lib_htmlmail!
As last solution you could try calling:
$myHtmlmailObject->useBase64();
Which will send the mail base64 encoded. This has the disadvantage that
the mails grows by 33%.
greets,
Bernhard
More information about the TYPO3-dev
mailing list