Skip to main content

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:

MethodWhen to Use
PHP mail()Only for local testing; unreliable for production
sendmailIf your server has sendmail/postfix configured
SMTPRecommended โ€” use a dedicated email relay service

For production journals, use SMTP with a transactional email service:

ServiceFree TierNotes
SendGrid100 emails/dayGood deliverability; easy setup
Mailgun1,000 emails/monthDeveloper-friendly API and SMTP
Amazon SES62,000/month (EC2)Very low cost; requires AWS account
Brevo (Sendinblue)300 emails/dayEasy setup; EU-based
PostmarkPaidExcellent deliverability for transactional email
Gmail SMTP500/dayUse only for very small journals

Step 2 โ€” Configure SMTP in config.inc.phpโ€‹

Site Administrators configure SMTP globally by editing config.inc.php:

  1. Open config.inc.php in a text editor (SSH/SFTP access required).
  2. 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
  1. Save the file.

Common SMTP Settings by Providerโ€‹

ProviderHostPortAuthSecurity
SendGridsmtp.sendgrid.net587PLAINTLS
Mailgunsmtp.mailgun.org587PLAINTLS
Amazon SESemail-smtp.us-east-1.amazonaws.com587LOGINTLS
Brevosmtp-relay.brevo.com587LOGINTLS
Gmailsmtp.gmail.com587LOGINTLS
Gmail App Password

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:

  1. Navigate to Settings โ†’ Journal โ†’ Contact.
  2. Set the Principal Contact Email โ€” this becomes the From address for journal emails.
  3. Verify this address is authorised in your SMTP provider's sender settings.
  4. 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โ€‹

  1. Log in to your email provider's dashboard.
  2. Find Domain Authentication or DKIM settings.
  3. Copy the CNAME/TXT records provided and add them to your DNS.
  4. 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:

  1. Navigate to Settings โ†’ Workflow โ†’ Email Templates.
  2. Find the template you want to edit (e.g., Review Request).
  3. Click Edit.
  4. Modify the Subject and Body.
  5. Available variables (insert with {$variableName}):
VariableValue
{$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
  1. Click Save.
Reset a Template

If you make a mistake, click Reset to Default to restore the original template text.


Step 6 โ€” Test Email Deliveryโ€‹

  1. Submit a test article as an author account.
  2. Check that the Acknowledgement of Submission email arrives in your inbox.
  3. If no email is received:
    • Check your spam/junk folder.
    • Review the server's mail log (/var/log/mail.log or /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:

  1. Go to Administration โ†’ Email Log (if the logging plugin is enabled).
  2. Review sent emails and any error messages.

Troubleshootingโ€‹

ProblemSolution
Emails not sent at allVerify SMTP credentials in config.inc.php; check server firewall allows outbound port 587
Emails in spamSet up SPF/DKIM/DMARC DNS records; use a reputable SMTP provider
Authentication failedDouble-check username/password; for SendGrid use apikey as the username and the full API key as the password
TLS handshake errorCheck that your server supports TLS 1.2+; try port 465 (SMTPS) as an alternative
Emails delayedCaused by your email provider rate-limiting; check provider dashboard for sending limits
Template variables not replacedVerify variable names (case-sensitive) and that the journal has complete contact settings

Next Stepsโ€‹