Forums / Setup & design / SMTP Authentication / Comment24336
Guido Faecke
Monday 02 April 2007 3:08:27 pm
so, i changed it a little bit more...
function auth() { /* if the connection is made */ /* changed from "AUTH" to "AUTH LOGIN" by G.Faecke */ //if ( $this->send_cmd('AUTH', '334' ) ) if ( $this->send_cmd('AUTH LOGIN', '334' ) ) { /* if sending username ok */ if ( $this->send_cmd( base64_encode( $this->user ), '334' ) ) { /* if sending password ok */ if ( $this->send_cmd( base64_encode( $this->pass ), '235' ) ) { /* set the authenticated flag and return TRUE */ $this->authenticated = TRUE; return TRUE; } } } /* added "AUTH PLAIN" by G.Faecke */ if ( $this->send_cmd('AUTH PLAIN', '334' ) ) { if ( $this->send_cmd( base64_encode( chr(0) . $this->user . chr(0) . $this->pass), '235' ) ) { /* set the authenticated flag and return TRUE */ $this->authenticated = TRUE; return TRUE; } } /* in other case return FALSE */ return FALSE; }
I hope that's ok ;-)
Guido
my first ezPublish setup (test) ever with http://www.usa-info.net