[geeklog-users] Suggested changes to lib-common.php/COM_isemail()

geeklog-users-admin at lists.geeklog.net geeklog-users-admin at lists.geeklog.net
Mon Sep 8 01:10:17 EDT 2003


Hi,

On Thu, 4 Sep 2003 19:26:11 +0200 geeklog-users-admin at lists.geeklog.net wrote:

> Bob wrote:
> 
> >It looks like Mail_RFC822::isValidInetAddress has the same problem with
> >not recognizing '+' as valid
> 
> Have you thought about reporting that as a bug and/or contributing a
> better version? Testing for valid email addresses is a pretty standard
> task in a web-based application. I had actually hoped that the RFC822
> class would comply with RFC(2)822, so that we don't have to reinvent the
> wheel ...

I'm more than happy to report it or suggest a patch. I'm extremely busy
with the day job and managing some theatrical productions, but I should
be able to submit something a little more robust soon. Note that the
class does a good job parsing the addresses into comments, hosts,
local-paths, etc. It's just that the method isValidInetAddress takes a
quick-and-dirty approach that is suitable for most cases.

> >though I agree, using PEAR::Mail is a
> >better solution, if only so you have less code to maintain. Reduce,
> >reuse, recycle.
> 
> (see above) So much for reuse :-/

Then again, if PEAR::Mail does what your original code does and it's
less code for you to maintain, use it; we can work on getting PEAR::Mail
to do the right thing and more people will benefit. Since I'm the one
bitten by it, the burden is on me to get it fixed.

...
> Btw, the CVS version of Geeklog now uses PEAR::Mail. See the post over on
> geeklog-devtalk:
> 
> <http://lists.geeklog.net/pipermail/geeklog-devtalk/2003-September/000285.html>

Beautiful - I'm much happier with code that speaks SMTP rather than code
that expects sendmail is installed locally. It comes in very handy in
those unfortunate cases where I need to install code under Windows. :)

Thanks again for all your work.

-- Bob



More information about the geeklog-users mailing list