File tree Expand file tree Collapse file tree 1 file changed +8
-12
lines changed
Expand file tree Collapse file tree 1 file changed +8
-12
lines changed Original file line number Diff line number Diff line change @@ -3622,18 +3622,14 @@ function smtp_api($action, $data) {
36223622 $ mail ->CharSet = 'UTF-8 ' ;
36233623 $ mail ->XMailer = 'mailcow SMTP API ' ;
36243624
3625- // Enable authentication if password is provided
3626- if (!empty ($ smtp_pass )) {
3627- $ mail ->SMTPAuth = true ;
3628- $ mail ->Username = $ smtp_user ;
3629- $ mail ->Password = $ smtp_pass ;
3630- if ($ smtp_port == 465 ) {
3631- $ mail ->SMTPSecure = PHPMailer::ENCRYPTION_SMTPS ;
3632- } elseif ($ smtp_port == 587 ) {
3633- $ mail ->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS ;
3634- }
3635- } else {
3636- $ mail ->SMTPAuth = false ;
3625+ // Authentication is required
3626+ $ mail ->SMTPAuth = true ;
3627+ $ mail ->Username = $ smtp_user ;
3628+ $ mail ->Password = $ smtp_pass ;
3629+ if ($ smtp_port == 465 ) {
3630+ $ mail ->SMTPSecure = PHPMailer::ENCRYPTION_SMTPS ;
3631+ } elseif ($ smtp_port == 587 ) {
3632+ $ mail ->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS ;
36373633 }
36383634
36393635 // Set sender
You can’t perform that action at this time.
0 commit comments