Skip to content

Commit aa99894

Browse files
authored
Tweak auth none
1 parent 8613bcf commit aa99894

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

Model/SmtpTransport.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,15 +100,18 @@ public function __construct(
100100
'name' => 'localhost',
101101
'host' => $this->helper->getConfig('smtp/host'),
102102
'port' => $this->helper->getConfig('smtp/port'),
103-
'connection_class' => $this->helper->getConfig('smtp/auth'),
104103
'connection_config' => [
105104
'username' => $this->helper->getConfig('smtp/username'),
106105
'password' => $this->helper->getConfig('smtp/password'),
107106
]
108107
];
109108

110-
$ssl = $this->helper->getConfig('smtp/ssl');
111-
109+
$auth = $this->helper->getConfig('smtp/auth');
110+
if ($auth && $auth !== 'none') {
111+
$options['connection_class'] = $auth;
112+
}
113+
114+
$ssl = $this->helper->getConfig('smtp/ssl');
112115
if ($ssl && $ssl !== 'none') {
113116
$options['connection_config']['ssl'] = $ssl;
114117
}

0 commit comments

Comments
 (0)