Gmail SMTP Not Working, How To Fix it for Open Journal Systems?
The following information is about the solution to set Gmail’s SMPT in ADS after restrictions from google. To help keep your account secure, as of May 30, 2022, Google no longer supports the use of third-party apps or devices. So what should the new settings be like?
For the Gmail SMTP integration to work smoothly, we first need to activate 2-factor authentication.
How to activate two-factor authentication on your Google account
When you use 2-Step Verification, some less secure apps or devices may be blocked from accessing your Google Account. App Passwords are a way to let the blocked app or device access your Google Account.
To send mail via Gmail SMTP in OJS (Open Journal Systems)
1. Enable /Turn on 2-step verification.
2. Get an app password.
Turn on 2-Step Verification
With 2-Step Verification, also called two-factor authentication, you can add an extra layer of security to your account in case your password is stolen. After you set up 2-Step Verification, you can sign in to your account with:
- Your password
- Your phone
1. Allow 2-Step Verification
- Open your Google Account.
- In the navigation panel, select Security.
- Under “Signing in to Google,” select 2-Step Verification Get started.
- Follow the on-screen steps.
Sign in with App Passwords
An App Password is a 16-digit passcode that gives a less secure app or device permission to access your Google Account. App Passwords can only be used with accounts that have 2-Step Verification turned on.
2. Create & use App Passwords for OJS
If you use 2-Step-Verification and get a “password incorrect” error when you sign in, you can try to use an App Password.
- Go to your Google Account.
- Select Security.
- Under “Signing in to Google,” select App Passwords. You may need to sign in. If you don’t have this option, it might be because:
- 2-Step Verification is not set up for your account.
- 2-Step Verification is only set up for security keys.
- Your account is through work, school, or other organization.
- You turned on Advanced Protection.
- At the bottom, choose Select app and choose the OTHER Generate.
5. Follow the instructions to see the App Password. The App Password is the 16-character code in the yellow bar.
Copy the 16-character code. We will use this code in OJS’s Configuration file.
6. Tap Done.
OJS SMTP Settings For Gmail
Now let’s make the necessary changes in OJS:
1. Open the config.inc.php file.
2. Find the lines with the Email Settings.
3. Set the mail settings as you see below.
Note: In the psmtp_password field, do not enter the gmail password, but the 16-character app password you just got.