Re: Bug #15590: PEAR's send() & special characters

From: Date: Sun, 17 Feb 2002 20:27:02 +0000
Subject: Re: Bug #15590: PEAR's send() & special characters
References: 1 2  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-4766@lists.php.net to get a copy of this message
Dear Antonio. I realize that but I think the right action isn't being taken. When joe@example.com sends an email to an invalid email address (i.e. ævar@example.com) PEAR should notify him. As it is now, the local postmaster receives the mail as if it were sent directly to him. I don't believe that is the right action. Comments ? Björn Swift ----- Original Message ----- From: "Antonio Carlos Venancio Junior" <floripa@organiKa.com.br> To: <bjorn@swift.st> Cc: <pear-dev@lists.php.net> Sent: Sunday, February 17, 2002 6:52 PM Subject: Re: [PEAR-DEV] Bug #15590: PEAR's send() & special characters Bjorn, That characters are not allowed in mail addresses. =) On Sun, 2002-02-17 at 02:18, bjorn@swift.st wrote: > From: bjorn@swift.st > Operating system: FreeBSD 4.5-REL > PHP version: 4.1.1 > PHP Bug Type: PEAR related > Bug description: PEAR's send() & special characters > > When sending mail to an email address including special characters (i.e. > æáó) using PEAR's Mail send(), an error is not returned but an email sent > to the local postmaster account. > > While the following command sends an email to "ævar@example.com" (and > allows the MTA to do the error handling) > <?php mail("ævar@example.com", "Test 1", "Using mail()") > ?> > > .. the following example code (taken from http://pear.php.net) > sends an > error to the local postmaster account. > <?php > include('Mail.php'); > > $recipients = 'ævar@example.com'; > $headers['From'] = 'me@myhost.com'; > $headers['To'] = $recipients ; > $headers['Subject'] = 'Test 2'; > > $body = 'Using PEAR\'s send()'; > $params['sendmail_path'] = '/usr/local/sbin/sendmail'; > > // Create the mail object using the Mail::factory method > $mail_object =& Mail::factory('sendmail', $params); > $mail_object->send($recipients, $headers, $body); > ?> > > I have played a little with the PEAR code and traced the problem to a > regular expression match in Mail/RFC822.php, line 518. > > if (!preg_match('/^[\\x00-\\x7E]+$/i', $atom, $matches)) { > return false; > } > > I have red *some* of RFC822 and know that ASCII characters above 127 are > not allowed (correct ?), but shouldn't PEAR either > a) Return an error > b) Pass the message along to the MTA like mail() > > .. instead of the message going to the local postmaster without notifying > the sender ? > -- > Edit bug report at http://bugs.php.net/?id=15590&edit=1 > -- > Fixed in CVS: http://bugs.php.net/fix.php?id=15590&r=fixedcvsŸ > ­ \j•Ú8ŒRrãJ > Fixed in release: > http://bugs.php.net/fix.php?id=15590&r=alreadyfixed > Need backtrace: > http://bugs.php.net/fix.php?id=15590&r=needtrace > Try newer version: > http://bugs.php.net/fix.php?id=15590&r=oldversion > Not developer issue: > http://bugs.php.net/fix.php?id=15590&r=support > Expected behavior: > http://bugs.php.net/fix.php?id=15590&r=notwrong > Not enough info: > http://bugs.php.net/fix.php?id=15590&r=notenoughinfo > Submitted twice: > http://bugs.php.net/fix.php?id=15590&r=submittedtwice > > > -- > PEAR Development Mailing List (http://pear.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Cya +++ Antonio CVS .: organiKa :. "We use only recicled bits" floripa@organiKa.com.br http://www.organiKa.com.br

« previous php.pear.dev (#4766) next »