Call connect with explicite paramters.

This commit is contained in:
Tobias Herre 2023-11-08 12:22:28 +00:00
parent 8fdf751d37
commit e9a8caea51
1 changed files with 11 additions and 8 deletions

View File

@ -78,18 +78,21 @@ class password_recovery_send {
$msg_body .= "--=_$ctb--";
$msg_body .= "\r\n\r\n";
$smtp_host=null;
$smtp_user=null;
$smtp_pass=null;
if($this->rc->config->get('smtp_pass') == "%p") {
$smtp_server = $this->rc->config->get('pr_default_smtp_server');
$smtp_user = $this->rc->config->get('pr_default_smtp_user');
$smtp_pass = $this->rc->config->get('pr_default_smtp_pass');
}
// send message
if (!is_object($this->rc->smtp)) {
$this->rc->smtp_init(true);
$this->rc->smtp_init(false);
}
if($this->rc->config->get('smtp_pass') == "%p") {
$this->rc->config->set('smtp_server', $this->rc->config->get('pr_default_smtp_server'));
$this->rc->config->set('smtp_user', $this->rc->config->get('pr_default_smtp_user'));
$this->rc->config->set('smtp_pass', $this->rc->config->get('pr_default_smtp_pass'));
}
$this->rc->smtp->connect();
$this->rc->smtp->connect($smtp_server,null, $smtp_user, $smtp_pass);
if($this->rc->smtp->send_mail($from, $to, $headers, $msg_body)) {
return true;
} else {