Username/password for for mail model

Signed-off-by: Janos SUTO <sj@acts.hu>
This commit is contained in:
Janos SUTO 2023-01-31 15:20:37 +01:00
parent d944fe2c2b
commit 9b8b9ec63b

View File

@ -52,11 +52,8 @@ class ModelMailMail extends Model {
unset($config['ssl']);
try {
if ($username != "" && $password != "") {
if($config['username'] && $config['password']) {
$config['auth'] = 'login';
$config['username'] = $username;
$config['password'] = $password;
$connection = new Zend_Mail_protocol_Smtp_Auth_Login($smtphost, $smtpport, $config);
} else {
$connection = new Zend_Mail_protocol_Smtp($smtphost, $smtpport, $config);