Patch for Mail/RFC822.php

From: Date: Tue, 26 Jun 2001 17:04:07 +0000
Subject: Patch for Mail/RFC822.php
Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-493@lists.php.net to get a copy of this message
I have made some changes to the pear/Mail/RFC822.php file from the latest in cvs (Revision: 1.6). Specifically, I have modified the validateMailbox function to properly handle RFC822 comments [text in ()'s]. Any text found inside of any () pairs appearing in the address will be combined and placed either into mbox->personal (if otherwise empty) or mbox->comment. For example, this address: "Nic Bernstein" (yowzer) <nic@itech-mke.com> (howdee) when submitted for validation becomes: mbox->mailbox = nic mbox->host = itech-mke.com mbox->personal = "Nic Bernstein" mbox->comment = "yowzer howdee" And this address: (Nic Bernstein) nic@itech-mke.com when submitted for validation becomes: mbox->mailbox = nic mbox->host = itech-mke.com mbox->personal = "Nic Bernstein" I found this necessary to change, since the original code couldn't properly handle the () comments. These comments are depricated under RFC2822, but must still be accepted. I hope this is useful to the developers. Best regards, -nic -- Nic Bernstein nic@itech-mke.com Knowledge is free but you must provide your own container

Attachment: [/] RFC822.php.patch
« previous php.pear.dev (#493) next »