Tutorial: Configure Email in OJS
Role: Journal Manager / Site Administrator
Time: 20โ30 minutes
OJS Version: 3.5+
This tutorial explains how to configure OJS to send emails reliably using an SMTP server or a third-party email provider.
Why Email Configuration Mattersโ
OJS sends automated emails at every stage of the editorial workflow:
- Submission acknowledgements
- Review invitations and reminders
- Editorial decision notifications
- Publication announcements
If email is not configured correctly, these messages will fail silently or land in spam folders. Using a proper SMTP relay is strongly recommended.
Before You Startโ
- You have Site Administrator or Journal Manager access.
- You have SMTP credentials from your email provider (host, port, username, password).
- You know whether your server already has
sendmail/mail()configured.
Step 1 โ Choose an Email Delivery Methodโ
OJS supports three methods:
| Method | When to Use |
|---|---|
| PHP mail() | Only for local testing; unreliable for production |
| sendmail | If your server has sendmail/postfix configured |
| SMTP | Recommended โ use a dedicated email relay service |
For production journals, use SMTP with a transactional email service:
| Service | Free Tier | Notes |
|---|---|---|
| SendGrid | 100 emails/day | Good deliverability; easy setup |
| Mailgun | 1,000 emails/month | Developer-friendly API and SMTP |
| Amazon SES | 62,000/month (EC2) | Very low cost; requires AWS account |
| Brevo (Sendinblue) | 300 emails/day | Easy setup; EU-based |
| Postmark | Paid | Excellent deliverability for transactional email |
| Gmail SMTP | 500/day | Use only for very small journals |
Step 2 โ Configure SMTP in config.inc.phpโ
Site Administrators configure SMTP globally by editing config.inc.php:
- Open
config.inc.phpin a text editor (SSH/SFTP access required). - Find the
[email]section:
[email]
; Use SMTP for sending mail instead of mail()
smtp = On
; SMTP server settings
smtp_server = smtp.sendgrid.net
smtp_port = 587
; Enable SMTP authentication
smtp_auth = PLAIN
smtp_username = apikey
smtp_password = SG.xxxxxxxxxxxxxxxxxxxx
; Enable TLS encryption
smtp_secure = tls
; From address for all outgoing mail
default_envelope_sender = journal@yoursite.com
; Allow envelope sender to be changed per journal
allow_envelope_sender = Off
- Save the file.
Common SMTP Settings by Providerโ
| Provider | Host | Port | Auth | Security |
|---|---|---|---|---|
| SendGrid | smtp.sendgrid.net | 587 | PLAIN | TLS |
| Mailgun | smtp.mailgun.org | 587 | PLAIN | TLS |
| Amazon SES | email-smtp.us-east-1.amazonaws.com | 587 | LOGIN | TLS |
| Brevo | smtp-relay.brevo.com | 587 | LOGIN | TLS |
| Gmail | smtp.gmail.com | 587 | LOGIN | TLS |
If using Gmail SMTP, you must use an App Password (not your regular password). Enable 2-Step Verification on your Google account, then generate an App Password at myaccount.google.com/apppasswords.
Step 3 โ Configure Sender Address in Journal Settingsโ
Journal Managers can override the sender address per journal:
- Navigate to Settings โ Journal โ Contact.
- Set the Principal Contact Email โ this becomes the
Fromaddress for journal emails. - Verify this address is authorised in your SMTP provider's sender settings.
- Click Save.
Step 4 โ Set Up SPF, DKIM, and DMARC Recordsโ
To prevent your emails from being marked as spam, configure DNS records:
SPF Recordโ
Add a TXT record to your domain's DNS:
v=spf1 include:sendgrid.net ~all
(Replace sendgrid.net with your provider's SPF include.)
DKIMโ
- Log in to your email provider's dashboard.
- Find Domain Authentication or DKIM settings.
- Copy the CNAME/TXT records provided and add them to your DNS.
- Verify domain authentication in the provider's dashboard.
DMARCโ
Add a TXT record:
_dmarc.yoursite.com TXT "v=DMARC1; p=none; rua=mailto:dmarc@yoursite.com"
Start with p=none to monitor before switching to p=quarantine or p=reject.
Step 5 โ Customise Email Templatesโ
OJS includes pre-written email templates for every workflow stage. To customise them:
- Navigate to Settings โ Workflow โ Email Templates.
- Find the template you want to edit (e.g., Review Request).
- Click Edit.
- Modify the Subject and Body.
- Available variables (insert with
{$variableName}):
| Variable | Value |
|---|---|
{$journalName} | Journal full name |
{$authorName} | Author's full name |
{$submissionTitle} | Manuscript title |
{$reviewerName} | Reviewer's full name |
{$editorialContactSignature} | Editor's name and journal name |
{$submissionUrl} | Direct link to the submission |
- Click Save.
If you make a mistake, click Reset to Default to restore the original template text.
Step 6 โ Test Email Deliveryโ
- Submit a test article as an author account.
- Check that the Acknowledgement of Submission email arrives in your inbox.
- If no email is received:
- Check your spam/junk folder.
- Review the server's mail log (
/var/log/mail.logor/var/log/maillog). - In OJS, go to Administration โ System Information and check for email-related errors.
Check Email Log (Site Admin)โ
OJS 3.5+ has a built-in email log:
- Go to Administration โ Email Log (if the logging plugin is enabled).
- Review sent emails and any error messages.
Troubleshootingโ
| Problem | Solution |
|---|---|
| Emails not sent at all | Verify SMTP credentials in config.inc.php; check server firewall allows outbound port 587 |
| Emails in spam | Set up SPF/DKIM/DMARC DNS records; use a reputable SMTP provider |
| Authentication failed | Double-check username/password; for SendGrid use apikey as the username and the full API key as the password |
| TLS handshake error | Check that your server supports TLS 1.2+; try port 465 (SMTPS) as an alternative |
| Emails delayed | Caused by your email provider rate-limiting; check provider dashboard for sending limits |
| Template variables not replaced | Verify variable names (case-sensitive) and that the journal has complete contact settings |
Next Stepsโ
- Email Providers Reference โ comparison of email services for OJS
- Mailing List Providers โ newsletter tools for reader announcements
- Tutorial: Set Up a New Journal โ complete journal configuration