Call connect with explicite paramters.
This commit is contained in:
parent
8fdf751d37
commit
e9a8caea51
19
lib/send.php
19
lib/send.php
|
@ -78,18 +78,21 @@ class password_recovery_send {
|
||||||
$msg_body .= "--=_$ctb--";
|
$msg_body .= "--=_$ctb--";
|
||||||
$msg_body .= "\r\n\r\n";
|
$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
|
// send message
|
||||||
if (!is_object($this->rc->smtp)) {
|
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->smtp->connect($smtp_server,null, $smtp_user, $smtp_pass);
|
||||||
$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();
|
|
||||||
if($this->rc->smtp->send_mail($from, $to, $headers, $msg_body)) {
|
if($this->rc->smtp->send_mail($from, $to, $headers, $msg_body)) {
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue