[horde] Subject encoding using Horde lib.
Jan Schneider
jan at horde.org
Fri May 2 15:03:38 UTC 2008
Zitat von "F." <dev001 at pas-world.com>:
> Hello,
> I am using something like this to set the mail Subject. I have a problem
> with codification result.
> Default message codification is UTF8 and works without any problem in
> body but do not work in Subject.
> Seems that I can not set UTF8 and libs get default ASCII.
> Anyone know how to solve this problem?
>
> In subject:
> $msg_headers = &new MIME_Headers();
> $msg_headers->addMessageIdHeader();
> $msg_headers->addHeader('Date', date('r'));
> $msg_headers->addHeader('To', $recp);
> $msg_headers->addHeader('Subject', _('['.SITE_NAME.']') . '
> ' .String::convertCharset($this->Subject, NLS::getCharset(), $charset));
>
>
>
> In body:
> $textBody = &new MIME_Part('text/plain');
> $textBody->setContents($textBody->replaceEOL($message));
> $textBody->setCharset($charset);
http://wiki.horde.org/Doc/Dev/MIMEPackage
Jan.
--
Do you need professional PHP or Horde consulting?
http://horde.org/consulting/
More information about the horde
mailing list