+ if (! isset ($use_authenticated_smtp) || $use_authenticated_smtp == false) {
+ fputs($smtpConnection, "HELO $domain\r\n");
+ $tmp = fgets($smtpConnection, 1024);
+ if (errorCheck($tmp, $smtpConnection)!=5) return(0);
+ } else {
+ fputs($smtpConnection, "EHLO $domain\r\n");
+ $tmp = fgets($smtpConnection, 1024);
+ if (errorCheck($tmp, $smtpConnection)!=5) return(0);
+
+ fputs($smtpConnection, "AUTH LOGIN\r\n");
+ $tmp = fgets($smtpConnection, 1024);
+ if (errorCheck($tmp, $smtpConnection)!=5) return(0);
+
+ fputs($smtpConnection, base64_encode ($username) . "\r\n");
+ $tmp = fgets($smtpConnection, 1024);
+ if (errorCheck($tmp, $smtpConnection)!=5) return(0);
+
+ fputs($smtpConnection, base64_encode (OneTimePadDecrypt($key, $onetimepad)) . "\r\n");
+ $tmp = fgets($smtpConnection, 1024);
+ if (errorCheck($tmp, $smtpConnection)!=5) return(0);
+ }