The plus symbol ("+") is an allowed character in email usernames. There may be others not in the regex. Oh, yeah, underscores. I think the preg_match line should at least be:
preg_match('/[a-z0-9\-\.\+_]+@{1}[a-z0-9\-\.]+/i', $from, $matches);
One could make the argument for a more inclusive expressions like:
preg_match('/[^\s<]+@{1}[^\s\.]+\.[^\s>]+/i', $from, $matches);
But I'm not an expert and it may include more than it really should.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | mimemail-1301876-1.patch | 549 bytes | sgabe |
Comments
Comment #1
sgabe commentedThe attached patch has been committed to both branches.