Academic Tools. Smarter Research.
Open Journal SystemsResolving OJS Email Failures

OJS Email Delivery Failure: Configuring SMTP & TLS Authentication

Step-by-step guide to solving email dispatch failures in Open Journal Systems. Learn how to configure authenticated SMTP in config.inc.php and set up SPF and DKIM.

When peer reviewer invitations and decision letters vanish into spam folders or fail to send entirely, your journal’s peer review cycle can be paralyzed for months.

Real Problem

Most academic journals rely on PHP’s default mail() function without SMTP authentication, causing major email providers like Gmail, Yahoo, and Outlook to reject notifications as fraudulent phishing.

Practical Solution

Configure authenticated SMTP over TLS in config.inc.php, implement SPF, DKIM, and DMARC DNS records for your journal domain, and establish queue workers for reliable background email dispatch.

OJS email not sendingOJS SMTP configurationfix OJS email notificationsOJS DKIM SPF setupacademic journal email delivery

The Critical Role of Email Notifications in Academic Publishing

Open Journal Systems is an asynchronous collaborative workflow platform. Reviewers agree to review papers based on email invitations; authors learn of acceptance or revisions via decision letters; and copyeditors receive notifications when drafts are ready.

If outbound email delivery fails, the journal effectively ceases to function. Reviewers never see invitations, editorial turnaround times skyrocket, and authors submit complaints about perceived silence.

Step 1: Disabling Legacy PHP mail() and Enabling SMTP

By default, OJS ships with smtp = Off, relying on the local Linux sendmail binary or PHP mail(). This must be changed immediately.

Open config.inc.php and locate the [email] section:

[email]

default_envelope_sender = "[email protected]"

force_default_envelope_sender = On

force_dmarc_compliant_from = On

; Use SMTP for sending mail

smtp = On

smtp_server = "smtp.mailgun.org" ; or smtp.office365.com, smtp.gmail.com

smtp_port = 587

smtp_auth = "tls"

smtp_username = "[email protected]"

smtp_password = "YourSecretSmtpPassword"

Step 2: Overcoming Port 25 Blocking on Cloud VPS

Virtually all cloud VPS providers (DigitalOcean, AWS, Linode, Hetzner) block outbound traffic on Port 25 by default to combat spam. Always configure Port 587 with TLS or Port 465 with SSL.

Step 3: Aligning Domain DNS Records: SPF, DKIM, and DMARC

Even with authenticated SMTP, modern mail servers will mark your messages as spam unless your DNS records prove the authenticity of your domain:

1. SPF Record (Sender Policy Framework):

Add a TXT record to your root domain:

v=spf1 include:mailgun.org ~all

2. DKIM Record (DomainKeys Identified Mail):

Add the public cryptographic TXT key provided by your SMTP provider:

k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQ...

3. DMARC Policy:

Add a TXT record at _dmarc.journal.institution.edu:

v=DMARC1; p=quarantine; rua=mailto:[email protected]

Step 4: Debugging SMTP Handshake Failures

If OJS fails to send email after updating configuration, check your PHP error log. If you see:

SMTP Error: Could not connect to SMTP host

Verify that outbound firewall rules allow outgoing connections on port 587 and that your PHP installation has php-openssl enabled.

Step-by-Step Action Plan

1

Audit Current Email Transport

Check config.inc.php to determine whether OJS is using the deprecated mail() function or SMTP.

2

Provision Dedicated SMTP Mailbox

Set up an institutional or transactional SMTP service (Google Workspace, Microsoft 365, Amazon SES, or SendGrid).

3

Configure config.inc.php SMTP Directives

Set smtp = On, smtp_server, smtp_port = 587, smtp_auth = ssl/tls, and valid credentials.

4

Configure SPF & DKIM DNS Records

Publish TXT records on your journal domain verifying the sending server’s authorized IP and public DKIM key.

5

Send Diagnostic Test Notification

Trigger an editorial notification and inspect email headers using mail-tester.com to achieve a 10/10 score.

Questions People Usually Ask

Why does OJS fail to send emails using default PHP mail()?

Default PHP mail() transmits messages directly from the web server IP without sender authentication. Major mail servers (Google, Microsoft) automatically reject unauthenticated messages to prevent spam.

What is the recommended SMTP port for OJS?

Port 587 with STARTTLS encryption is the global industry standard. Port 465 with SSL is also widely supported, whereas legacy Port 25 is almost universally blocked by cloud hosting providers.

Why do emails show "From: unverified-sender" in OJS 3.4?

In OJS 3.4, the envelope sender must match the authenticated SMTP account. If default_envelope_sender in config.inc.php is blank, mail relays will reject or flag the message.

Are Reviewer Invitations Landing in Spam?

AcademiaTech configures enterprise SMTP relays, DKIM cryptographic signatures, and SPF records to achieve 99.9% email inbox delivery.