Index: openacs-4/packages/acs-mail-lite/tcl/utils-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-mail-lite/tcl/utils-procs.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/acs-mail-lite/tcl/utils-procs.tcl 9 Jan 2008 11:10:23 -0000 1.1 +++ openacs-4/packages/acs-mail-lite/tcl/utils-procs.tcl 9 Jan 2008 12:11:55 -0000 1.2 @@ -155,3 +155,21 @@ return [list $message_token] } + +ad_proc -public acs_mail_lite::utils::valid_email_p { + email +} { + Checks if the email is valid. Returns 1 if it is. Uses mime::parsemail to determine this +} { + array set test [lindex [mime::parseaddress "$email"] 0] + if {$email ne $test(proper)} { + regsub "\"" $test(proper) "" proper + if {$email ne $proper} { + return 0 + } else { + return 1 + } + } else { + return 1 + } +}