[OJS 3.2.1.1] Google SMTP email issues

Hello all,

Currently, we’re in the process of setting up a new journal, utilizing the full features of OJS. While in the process of checking our server settings, configuration, and user roles on the admin side of things, we’re running into the issue of Google SMTP servers not accepting our request for emails going out. We have the configuration setup as follows:

;;;;;;;;;;;;;;;;;;
; Email Settings ;
;;;;;;;;;;;;;;;;;;
[email]
Use SMTP for sending mail instead of mail()
smtp = On
; SMTP server settings
smtp_server = smtp.gmail.com
smtp_port = 465

; Enable SMTP authentication
; Supported mechanisms: ssl, tls
smtp_auth = tls
smtp_username = gmailaccount@gmail.com
smtp_password = gmailaccountpassword

With the settings on our end setup, we also have the Gmail account setup allowing Third-Party less-secure apps and get a notification when we attempt to use the email when it’s configured for the first time. However, we’re still unable to send emails and I’m not sure what needs to be done now. From reading through other posts and topics, I’m not sure if we HAVE TO setup a Google OAUTH2 API in order to facilitate logging in, as I know Google deprecated UN/PW login in June 2020. We’re stuck an any help would be appreciated.

Thank you.

Hi,
I am not sure this will help, but have you tried either using SSL protocol with port 465, or using port 587 with TLS? This seems to be the recommended settings from google.

Hi,
Thank you for responding. Yes, I’ve tried both settings with the port information. Currently, the TLS setting on the port that I’m connecting to is the one that’s working with my setup. I’m sure there’s some other settings and server specific settings I can change and update that would work better. I’m just not sure what I need to do.
Thank you.

I started using some of the changes that were posted here based on the input of asmecher:

I’m testing out the gmail-oauth.diff.txt file information on my build to see if the write-up works. So far, OJS hasn’t returned an error but it’s doing nothing when I attempt to send an email.