 |
|
|
| View previous topic :: View next topic |
| Author |
Message |
mkrivan
Joined: 12 Apr 2008 Posts: 2 Location: Hungary
|
Posted: Sat Apr 12, 2008 6:28 pm Post subject: RFC822 - parsing email addresses |
|
|
I have tried the following code:
$email = '"Test" <any@mydomain.hu> (any)';
$addresses = Mail_RFC822::parseAddressList( $email, 'anydomain.hu', FALSE );
It always raise an exception.
If I change the comment so the username part of e-mail and comment become different, everything works fine.
$email = '"Test" <any@mydomain.hu> (any1)';
$addresses = Mail_RFC822::parseAddressList( $email, 'anydomain.hu', FALSE );
This works fine.
Is there somebody how already knows a solution for this problem?
Thanks in advance.
Miklos |
|
| Back to top |
|
 |
mkrivan
Joined: 12 Apr 2008 Posts: 2 Location: Hungary
|
Posted: Sat Apr 12, 2008 9:15 pm Post subject: Found the bug |
|
|
I have found something in the RFC822.php package so I think I could repaire the problem.
The main problem was int the function validateMailbox(&$mailbox);
The strange row was:
$_mailbox = substr( $_mailbox, strpos($_mailbox, $comment)+strlen($comment)+1 );
If I change it to
$_mailbox = substr( $_mailbox, strrpos($_mailbox, $comment)+strlen($comment)+1 );
The problem disappear. I think the block is too complicated anyhow it would be nice to simplify it. I will write some suggestion to the authors soon. |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|