Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 2.0.0

Bug #2242 Error with UTF-8 Headers
Submitted: 2004-08-28 01:01 UTC
From: thomas at haeber dot de Assigned:
Status: No Feedback Package: Mail
PHP Version: 5.0.1 OS: SuSE Linux 9.1 (Kernel 2.6.5)
Roadmaps: (Not assigned)    
Subscription  


 [2004-08-28 01:01 UTC] thomas at haeber dot de
Description: ------------ used Mail 1.1.3 stable UTF-8 headers like: Array ( [MIME-Version] => 1.0 [From] => Bau =?UTF-8?Q?Dr=C3=B6mling?= e.G - Hauptsitz <name@example.de> [To] => name@example.de [Subject] => =?UTF-8?Q?Best=C3=A4tigung?= Ihrer Anfrage bei der Bau =?UTF-8?Q?Dr=C3=B6mling?= e.G. [Content-Type] => text/plain; charset="UTF-8" [Content-Transfer-Encoding] => 8bit ) will abort with the following Error-Message: Fatal error: Cannot use object of type PEAR_Error as array in /usr/local/lib/php/Mail.php on line 136 Reproduce code: --------------- $headers = array( "MIME-Version" => "1.0", "From" => "Bau =?UTF-8?Q?Dr=C3=B6mling?= e.G - Hauptsitz <name@example.de>", "To" => "name@example.de", "Subject" => "=?UTF-8?Q?Best=C3=A4tigung?= Ihrer Anfrage bei der Bau =?UTF-8?Q?Dr=C3=B6mling?= e.G.", "Content-Type" => "text/plain; charset=\"UTF-8\"", "Content-Transfer-Encoding" => "8bit" ); $mail->send("name@example.de", $headers, "some text"); Expected result: ---------------- Actual result: -------------- Fatal error: Cannot use object of type PEAR_Error as array in /usr/local/lib/php/Mail.php on line 136

Comments

 [2004-08-28 01:05 UTC] thomas at haeber dot de
Of course i created a valid mail-object, firsty; e.g.: $mail_params["sendmail_path"] = "path/to/sendmail/"; $mail =& Mail::factory("sendmail", $mail_params);
 [2004-09-09 02:11 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!
 [2004-09-09 02:27 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!
 [2004-09-10 00:02 UTC] thomas at haeber dot de
After hours, I've found a solution for my Problem. If you use quotemarks for the personal-part of an e-mail the RFC 822-Test will pass. e.g use: "Bau =?UTF-8?Q?Dr=C3=B6mling?= e.G" - Hauptsitz <name@example.de> instead of: Bau =?UTF-8?Q?Dr=C3=B6mling?= e.G - Hauptsitz <name@example.de> By The Way the RFC 822-Test shouldn't fail if you don't use quotemarks. And the Mail-package should send such an Mail. And good work with the resolved fatal error-bug.
 [2004-09-13 05:45 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!
 [2004-12-21 20:18 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!
 [2005-02-25 11:46 UTC] bugs-horde at interfasys dot ch
I have the same problem with Horde 3.0.3 and IMP 4.0.2. If I have some non-ascii characters in the name of the identity (ie. sàrl which is pretty common since it's gmbh), then the message cannot be sent using UTF-8 encoding. I either have to switch to ISO8859-15 or change the name of the sender.
 [2006-11-20 12:51 UTC] karsten at typo3 dot org (Karsten Dambekalns)
I just stumbled over the same bug - recipient addresses containing special (non-ascii) characters in encoded form are only accepted if all double quotes are stripped from the address... PEAR Mail 1.1.14 PHP 4.3.10