# Found bug in PHP mailheader patch



## blodan (Sep 13, 2010)

Hi!

I found a bug in the mail header patch when using UTF-8.

If you have a url that contains custom chars, such as Ã¥ Ã¤ Ã¶, the mail header patch breaks that utf-8 encoding when it puts the path into the mailheader.

Anyone able to fix this?

Howto reproduce:
create a rewritten url with one of the chars Ã¥ Ã¤ Ã¶, or probably any other multibyte char. Make sure to set the header and encodings to utf-8 for that site.

Send a mail using mail();

You will then have a malformed header (see attached screenshot) and will be picked up by spamdetection softwares as "BAD HEADER".

Im not that good in coding C so i cant make a fix for this myself, hope someone here can.

(Using PHP 5.3.3 btw)


----------



## DutchDaemon (Sep 13, 2010)

Inform the port maintainer or file a PR. Most people on the forums are users, not developers or ports committers.


----------

