Skip to content

Instantly share code, notes, and snippets.

@monirehbastami
Last active October 21, 2024 11:41
Show Gist options
  • Save monirehbastami/5b1e28e701ebdc8b1e89e00f493839c1 to your computer and use it in GitHub Desktop.
Save monirehbastami/5b1e28e701ebdc8b1e89e00f493839c1 to your computer and use it in GitHub Desktop.
SMTP Setting in OJS
To enable SMTP for Gmail and use it for sending emails through OJS, follow these steps:
1. Enable Less Secure App Access
- Sign in to your Google account.
- Go to the Google Account Security page.
- Scroll down to find the "Less secure app access" section. If this option is available, turn it on.
* Note: Google is phasing out this option, so if it’s not available, you will need to use a different method, like "App Passwords."
2. Enable Two-Step Verification and Create an App Password
If Google has blocked less secure app access, you need to use an App Password. To do this:
- Sign in to your Google account.
- Go to the Google Account Security page.
- Enable "2-Step Verification."
- After enabling it, go to the "App Passwords" section.
- Select the type of device or service you want to use, and generate an App Password.
- Use this password to connect your application to Gmail.
3. SMTP Settings
In OJS, open config.inc.php file and enter the following SMTP settings:
default = smtp
sendmail_path = "/usr/sbin/sendmail -bs"
smtp = On
smtp_server = smtp.gmail.com
smtp_port = 465
smtp_auth = ssl
smtp_username = [email protected]
smtp_password = smtp_pass
#ojs_smtp #smtp_setting #problem_solving
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment