Roman Blöth schreef:
> Dear list,
> 
> 
> I have just joined this mailing list hoping to find advice on my
> mail()-problem, since even after over 1.5 hours of googling I still
> don't know how to solve this (hope this is the correct list for my problem):
> 
> In order to overcome any codepage-problems I coded a website completely
> using UTF-8. On this website there is a contact form starting like this:
> 
> <form id="kontaktformular_intern" action="$_SERVER[PHP_SELF]"
> method="post" enctype="multipart/form-data" accept-charset="UTF-8">
> 
> So I believe the code will receive all UTF-8-text for sending the mail.
> 
> To send the mail I coded the following:
> 
> function sendEmail($to, $from, $subject, $message) {
>   $header = 'From: ' . $from . "\r\n" . 'Reply-To: ' . $from . "\r\n" .
> 'X-Mailer: PHP/' . phpversion();
>   $header .= "\nContent-Type: text/plain; charset=UTF-8";
>   $header .= "\nContent-transfer-encoding: quoted-printable\n";
> 
>   $subject = utf8_decode($subject);
>   $subject = mb_encode_mimeheader($subject,
> mb_internal_encoding(),"B","\n");
>   return mail('r.blo...@gosub.de', $subject, $message, $header);
> }
> 
> This is what I had found some day in order to send UTF-8-encoded emails.
> Here with WindowsXP/Thunderbird everything works fine. But a friend of
> mine using some Windows and some Outlook will always receive srumbled
> german umlauts...
> 
> So I have tried to fumble with quoted-printable and base64-encoding, but
> it only gets worse...
> 
> Unfortunately I don't have the PEAR-library available on that server
> (unless I find out how to "install" it without ssh-access), so I will
> have to stick with using PHP's mail()-function.

assuming we're talking about some PEAR code and not a PECL extension then
you can just grab the relevant files from the PEAR site and upload
them to your site same as you do all your other code ... PEAR stuff
doesn't actually need to be installed ... it just comes with a cool management
tool that makes keeping stuff up2date and avoiding multiple copies, easier.

> 
> Can anyone give me any advice on how to accomplish this? The goal should
> be to send emails with german umlauts readable under linux, windows and
> os x.
> 
> 
> Thanks a load in advance and best regards,
> Roman.

-- 
PHP Unicode & I18N Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to