SMTP Connect() Failed When Using Zoho Mail in OJS 3.3.0.13

I am facing an issue with sending emails using Zoho Mail SMTP in OJS version 3.3.0.13. Previously, I was using Gmail SMTP, but since the app password is no longer supported by Google, I switched to Zoho Mail. However, after changing the SMTP settings to Zoho, I encountered the following error:

2024/10/14 11:31:33 [error] 1037876#1037876: *39087 FastCGI sent in stderr: "PHP message: SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting" while reading response header from upstream, client: 114.5.251.181, server: esj.eastasouth-institute.com, request: "POST /index.php/esmb/$$$call$$$/grid/settings/user/user-grid/send-email HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.4-fpm.sock:", host: "esj.eastasouth-institute.com", referrer: "https://esj.eastasouth-institute.com/index.php/esmb/management/settings/access"

Here are my settings in the config.inc.php file:

;;;;;;;;;;;;;;;;;;
; Email Settings ;
;;;;;;;;;;;;;;;;;;

[email]

; Use SMTP for sending mail instead of mail()
smtp = On

; SMTP server settings
smtp_server = smtppro.zoho.com
smtp_port = 587

; Enable SMTP authentication
smtp_auth = ssl
smtp_username = j*************h@zohomail.com
smtp_password = Kd9**********

I have tried different configurations, but the error persists. Has anyone experienced a similar issue or knows a solution to resolve this error?

SMTP protocol SSL using 465 port

still not working with same error message

App password for gmail is still availabe to use…

i I have 5 OJS websites and 1 Laravel website that were previously using Gmail SMTP with an app password. The email settings in the config.inc.php file were as follows:

[email]

; Use SMTP for sending mail instead of mail()
smtp = On

; SMTP server settings
smtp_server = smtp.gmail.com
smtp_port = 587

; Enable SMTP authentication
; Supported smtp_auth: ssl, tls (see PHPMailer SMTPSecure)
smtp_auth = tls
smtp_username = "************@gmail.com"
smtp_password = "qw*************"

These settings worked well for a long time, but starting from early October, all websites are now unable to send emails.

Also turn on this setting

allow_envelope_sender = On
default_envelope_sender = youremail@gmail.com
force_default_envelope_sender = On
force_dmarc_compliant_from = On
dmarc_compliant_from_displayname = '%n via %s'

All my ojs website still use gmail smtp to this day…

cek ure server host, Ask your hosting provider to allow the SMTP settings on their firewall.

that solved my problem with OJS 3.3.1.14

Here are my current email settings:

;;;;;;;;;;;;;;;;;;
; Email Settings ;
;;;;;;;;;;;;;;;;;;

[email]

; Use SMTP for sending mail instead of mail()
smtp = On

; SMTP server settings
smtp_server = smtp.gmail.com
smtp_port = 587

; Enable SMTP authentication
; Supported smtp_auth: ssl, tls (see PHPMailer SMTPSecure)
smtp_auth = tls
smtp_username = ************@gmail.com
smtp_password = sw*************
;
; Supported smtp_authtype: RAM-MD5, LOGIN, PLAIN, XOAUTH2 (see PHPMailer AuthType)
; (Leave blank to try them in that order)
; smtp_authtype =

; The following are required for smtp_authtype = XOAUTH2 (e.g. GMail OAuth)
; (See https://github.com/PHPMailer/PHPMailer/wiki/Using-Gmail-with-XOAUTH2)
; smtp_oauth_provider = Google
; smtp_oauth_email =
; smtp_oauth_clientid =
; smtp_oauth_clientsecret =
; smtp_oauth_refreshtoken =

; Enable suppressing verification of SMTP certificate in PHPMailer
; Note: this is not recommended per PHPMailer documentation
smtp_suppress_cert_check = On

; Allow envelope sender to be specified
; (may not be possible with some server configurations)
allow_envelope_sender = On

; Default envelope sender to use if none is specified elsewhere
default_envelope_sender = journaleastasouth@gmail.com

; Force the default envelope sender (if present)
; This is useful if setting up a site-wide no-reply address
; The reply-to field will be set with the reply-to or from address.
force_default_envelope_sender = On

; Force a DMARC compliant from header (RFC5322.From)
; If any of your users have email addresses in domains not under your control
; you may need to set this to be compliant with DMARC policies published by
; those 3rd party domains.
; Setting this will move the users address into the reply-to field and the
; from field will be rewritten with the default_envelope_sender.
; To use this you must set force_default_envelope_sender = On and
; default_envelope_sender must be set to a valid address in a domain you own.
force_dmarc_compliant_from = On

; The display name to use with a DMARC compliant from header
; By default the DMARC compliant from will have an empty name but this can
; be changed by adding a text here.
; You can use '%n' to insert the users name from the original from header
; and '%s' to insert the localized sitename.
dmarc_compliant_from_displayname = '%n via %s'

Despite these settings, the emails are still not being sent and I am receiving the following error message:

2024/10/15 11:00:47 [error] 1056121#1056121: *19 FastCGI sent in stderr: "PHP message: SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting" while reading response header from upstream, client: 180.244.138.132, server: esj.eastasouth-institute.com, request: "POST /index.php/eslhr/$$$call$$$/grid/settings/user/user-grid/send-email HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.4-fpm.sock:", host: "esj.eastasouth-institute.com", referrer: "https://esj.eastasouth-institute.com/index.php/eslhr/management/settings/access"

I tried checking Gmail SMTP with the app password using https://dnschecker.org, and the SMTP email works and is able to send emails.

then like @OpiqO said, check with your host… your ojs is working fine…

Thanks for the advice! After contacting our hosting provider and getting the SMTP settings sorted out, everything’s running smoothly in OJS now.