*
* SMTP delivery backend for the Deliver class.
*
- * @copyright 1999-2016 The SquirrelMail Project Team
+ * @copyright 1999-2022 The SquirrelMail Project Team
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @version $Id$
* @package squirrelmail
function preWriteToStream(&$s) {
if ($s) {
- if ($s{0} == '.') $s = '.' . $s;
+ if ($s[0] == '.') $s = '.' . $s;
$s = str_replace("\n.","\n..",$s);
}
}
global $use_smtp_tls,$smtp_auth_mech;
if ($authpop) {
- $this->authPop($pop_host, '', $user, $pass);
+ $this->authPop($user, $pass, $pop_host, '');
}
$rfc822_header = $message->rfc822_header;
$tmp = $this->parse_ehlo_response($stream);
if ($this->errorCheck($tmp,$stream)) {
// fall back to HELO if EHLO is not supported (error 5xx)
- if ($this->dlv_ret_nr{0} == '5') {
+ if ($this->dlv_ret_nr[0] == '5') {
fputs($stream, "HELO $helohost\r\n");
$tmp = fgets($stream,1024);
if ($this->errorCheck($tmp,$stream)) {
$server_msg .= substr($line, 4);
}
- if ( ((int) $err_num{0}) < 4) {
+ if ( ((int) $err_num[0]) < 4) {
return false;
}
return true;
}
- function authPop($pop_server='', $pop_port='', $user, $pass) {
+ function authPop($user, $pass, $pop_server='', $pop_port='') {
if (!$pop_port) {
$pop_port = 110;
}