Updated 2007-11-19 16:52:37 by LV

kroc (26 Sep 2003) a basic authentication using tcllib pop3 package.
 if 0 {
    # Authentication with POP3 :
    proc authpop {popserver user passwd} {
        package require pop3
        ::log::lvSuppress debug
        if {[catch "::pop3::open $popserver $user $passwd" socket]} {
            # it fails
            set answ "Wrong user name or password. Please try again."
        } else {
            # it's good
            close $socket
            set answ "Welcome $user"
        }
    }
 }

See also: http authentication and pop3.