[OJS3] user registration notifications fail silently

With OJS-3.1.2, newly registered users don’t receive a confirmation e-mail (USER_REGISTER).

In config.inc.php, we’ve set smtp = Off. This configuration is working for other e-mail notifications (editor notifications, editor decisions, … all arrive at the destination, no spam issues whatsoever), so these settings seem OK.

Unless I’m looking at the wrong place, I don’t see any mail related errors being logged. Registration is successful; yet the e-mail notification seems to fail silently. Since these notifications form a crucial part of the interaction of (new) users with our journal, this is critical.

I’ve found an ancient thread in the archives which seemed to report the same issue (Author submission emails and registration mails not working, referring to an even older thread), but it didn’t seem to have been resolved back then.

Are other users experiencing this, too, or is there a known fix? Any help would be greatly appreciated!


PS: @chomedey have you been able to find a solution for your issue?

Hi @rvdb,

If you’re using smtp = Off, then your local mail transfer agent (MTA) will be in charge of delivering the messages (sent via the PHP mail() function, mediated by the PHPMailer library).

The local MTA will log delivery messages in its own logs on the same server – details will vary, but it’ll generally be somewhere in /var/log such as /var/log/exim4/mainlog.

The most likely situation is that your MTA is not able to deliver the messages, and the logs should indicate why they’re being rejected. A likely cause is DMARC rule checking.

Starting with OJS 3.1.2, there are some additional tools to help generate DMARC-compliant emails. See e.g. the force_dmarc_compliant_from and dmarc_compliant_from_displayname options in config.inc.php. These are discussed in depth at Support generating DMARC compliant mails · Issue #4164 · pkp/pkp-lib · GitHub and Option to use a global sender address for emails (to fight spamfilters?) · Issue #4014 · pkp/pkp-lib · GitHub.

Alec Smecher
Public Knowledge Project Team

Yes I had this same issue ages ago and did resolve it in the end.

I had to go in and change some code somewhere but it was so long ago that I can’t remember what I did. Sorry I didn’t update the thread at the time.

It is resolveable though.

Isn’t there a newer version of the software now though?

Thanks, @asmecher. Yet, other mails can be sent from OJS without problem; doesn’t that rule out DMARC misconfiguration? The server is Plesk-based; I’m not sure if I should look elsewhere, but I don’t see anything related to the times I’m testing in files such as /var/log/mail.log.

And thanks for your thoughts, @chomedey. I’m using the latest OJS-3.1.2, indeed.

@asmecher, changing to SMTP doesn’t change anything: while OJS e-mails with editor decisions etc. do arrive at the destination, user registration confirmation e-mails apparently aren’t sent.

Hi @rvdb,

The only way to know for sure why a message is being rejected is to look at your server’s email sending log. Generally that’s easier to track down with smtp = Off, because it’ll be on the same machine you’re hosting from. It is possible that messages are being selectively delivered, either because of DMARC rules or other spam flagging.

Alec Smecher
Public Knowledge Project Team

Ok, thanks for the smtp hint, @asmecher. I’ve investigated further, and maybe I’ve found some clue.

  • If I send an e-mail via OJS that does reach its destination (an editor decision, which is triggered manually), I find traces in /var/log/mail.log:

    Mar 20 23:59:32 rs211454 postfix/pickup[29549]: A25921FA111: uid=10000 from=<contact@mytestournal.domain>
    Mar 20 23:59:32 rs211454 postfix/cleanup[32275]: A25921FA111: message-id=<FCoXguABQU7vsJk3V7xGO4rXX887QDq1uaNF5lIVA@mytestjournal.domain>
    Mar 20 23:59:32 rs211454 postfix/qmgr[2057]: A25921FA111: from=<contact@mytestournal.domain>, size=2387, nrcpt=1 (queue active)
    Mar 20 23:59:33 rs211454 postfix/smtp[32277]: A25921FA111: to=<newjournaluser@gmail.com>, relay=gmail-smtp-in.l.google.com[]:25, delay=0.69, delays=0.01/0.01/0.12/0.54, dsn=2.0.0, status=sent (250 2.0.0 OK  1553122788 s8si2194172wro.38 - gsmtp)
    Mar 20 23:59:33 rs211454 postfix/qmgr[2057]: A25921FA111: removed
  • After registering as a new user (which should trigger an automated confirmtion e-mail), I find… no such trace at all in that same log. To me, this rather suggests that no e-mail was even attempted to be sent, and something indeed went wrong.

In case this may be relevant, the registration page shows following warnings (when display_errors = On):

Warning: Declaration of RegistrationHandler::validate($request) should be compatible with PKPHandler::validate($requiredContexts = NULL, $request = NULL) in /var/www/vhosts/kantl.be/sites/mytestjournal.domain/ojs-3.1.2/lib/pkp/pages/user/RegistrationHandler.inc.php on line 19
Warning: Declaration of RegistrationForm::validate() should be compatible with Form::validate($callHooks = true) in /var/www/vhosts/kantl.be/sites/mytestjournal.domain/ojs-3.1.2/lib/pkp/classes/user/form/RegistrationForm.inc.php on line 21

For what it’s worth, user registration on an OJS-2.4.8 journal on the same server, with the same e-mail configuration settings, does successfully send a confirmation e-mail. I notice that a confirmation e-mail had to be selected explicitly by the user during registration in OJS-2.4.8, while that option is absent in the registration form for OJS-3.1.2, but I assume that the e-mail just should always be sent in OJS-3.1.2?

Is it possible that the sending of the USER_REGISTER notification is in any way influenced by tracking/privacy settings of a browser?

When I’m just grepping for “USER_REGISTER” in the source code, I find a check for a $sendNotify variable in pkp-lib/UserDetailsForm.inc.php at stable-3_1_2 · pkp/pkp-lib · GitHub. Are there any known factors that could influence this variable, or the sending of automatic e-mails (i.e. those that are not explicitly triggered by a user of the OJS backend)?

If that script indeed is the code responsible for triggering the e-mail action, is there any way to debug it there?

I’ll be off for the next days, but afterwards I’m definitely willing to investigate this further (new users must be notified, and we must make sure that automatic e-mails are working).

Ok, I’m back, have started with a completely blank OJS installation and database (to rule out upgrade issues).

I’m quite convinced that:

  • e-mail configuration is OK: it is possible to send e-mails with OJS. Those successful e-mails:

    • do arrive without problems in the recipient inbox
    • are logged in /var/log/mail.log
  • the hook responsible for the USER_REGISTER e-mail is somehow failing:

    • the user registration e-mail doesn’t arrive
    • AND I don’t find any traces at all of an e-mail attempt in /var/log/mail.log

For example: if I set require_validation = On in config.inc.php, a new user does receive an USER_VALIDATE e-mail message with a confirmation link. When clicking that link, registration is successful, but the USER_REGISTER e-mail never gets sent, nor logged. This strongly suggests that the USER_REGISTER hook never is attempted for some reason.

@asmecher, do you have any ideas on how to find out what goes wrong with the USER_REGISTER hook? I’d greatly appreciate any help for getting this working!

Ok, tested on a different server, same results:

  • e-mail configuration seems to be OK (e.g. USER_VALIDATE e-mails do get sent in good order)
  • USER_REGISTER e-mails aren’t sent (both if require_validation is set to On and Off, in case the validation step would interfere with the USER_REGISTER hook)

Doesn’t this identical behaviour on two different servers indicate that something could be wrong with the USER_REGISTER hook in OJS-3.1.2?

If so, is this forum the proper place to discuss this, @asmecher (forgive me for addressing you personally, but so far you’ve been the sole developer who has kindly given your thoughts)? I’m getting a bit worried that I’ve invested quite a lot of time in completing the Dutch translation for both OJS-3.1.2 and OJS-3.1.1 (though the latter set of pull requests hasn’t received any attention so far) and now am facing some quirks that make the system unreliable to unusable for our journals. These are real user problems, which I’ve tried to describe as accurate as possible; if needed, I’m willing to invest some time for fixing them; I’ve tried my best to raise awareness, and I don’t know how to proceed.

Without wanting to be impatient or rude (on the contrary, rather), if this forum seems to be an unsuitable place for getting advice, I’ll try to report this as a bug on Github.

I think I’ve found an answer. Browsing through the Github issue tracker, I’ve come across these issues:



Gathering from the diff of this associated commit:

…this seems to be the place where the USER_REGISTER e-mail notification has been removed from the user registration form.

So, it seems that USER_REGISTER is no longer triggered in OJS-3.x when users register themselves for a journal. This is a change from OJS-2.4.8 for which I didn’t find any documentation (apart from the Github issues mentioned above), so I guess my original post was misguided by false expectations, and the fact that the USER_REGISTER e-mail template is still present.

Digging a bit further, in case it could help other users who bump into this thread, the USER_REGISTER e-mail is still being used, but only when new users are added by a journal manager (and the “Send user a welcome email” option is selected). It is no longer being triggered when users self-register for a journal.

I’m still wondering, though, if it wouldn’t make sense to create another e-mail template for completing the self-registration process (something in the line of USER_REGISTER_WELCOME), that could just send a welcome e-mail to new users, without sending the password. I feel the current absence of any welcome message can be disorientating to new users.

1 Like

I have the same problem. As a journal manager, I registered a reviewer and a guest editor on their behalf, but the email was not received. The person is sitting next to me, so I know. There was also no error message.
I do not have access to the server. Please write full instructions so that I can give it to the technical person responsible for the server.
Thank you