Fix SMTP for servers that don't need auth (#783)
Currently this fails against servers that don't need or support AUTH but rely on other means to allow relaying email.
This commit is contained in:
parent
1d19d5578b
commit
6fd392bc15
|
@ -66,10 +66,12 @@ class MailSender {
|
|||
$this->mailerInstance->CharSet = 'UTF-8';
|
||||
|
||||
$this->mailerInstance->isSMTP();
|
||||
$this->mailerInstance->SMTPAuth = true;
|
||||
$this->mailerInstance->Host = $this->mailOptions['smtp-host'];
|
||||
$this->mailerInstance->Username = $this->mailOptions['smtp-user'];
|
||||
$this->mailerInstance->Password = $this->mailOptions['smtp-pass'];
|
||||
if($this->mailerInstance->Username !== '') {
|
||||
$this->mailerInstance->SMTPAuth = true;
|
||||
$this->mailerInstance->Username = $this->mailOptions['smtp-user'];
|
||||
$this->mailerInstance->Password = $this->mailOptions['smtp-pass'];
|
||||
}
|
||||
$this->mailerInstance->Timeout = 10;
|
||||
$this->mailerInstance->SMTPOptions = [
|
||||
'ssl' => [
|
||||
|
|
Loading…
Reference in New Issue