Subscription to Email Notifications

Hello everyone,

I’m working on creating a generic plugin for subscribing to notifications via email (a simple form with an email input and a submit button). So far, I’ve managed to create a form that collects email addresses and stores them in a custom table in the database.

However, I’m stuck on a couple of points:

  1. How can I intercept the notification email sending hook to include the addresses from my table in the recipients?
  2. Alternatively, is there a way to add a checkbox to the notify form to include these emails in outgoing notifications?

Thank you in advance,
Dmitrii

Hi @Dmitrii_Shpotya,

What version of OJS are you working with? (Please include this in your posts.)

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher,

I’am working with OJS 3.4.0.5.

Regards,
Dmitrii

Hi @Dmitrii_Shpotya,

You might have a look at this plugin code, which intervenes in the email sending process:

https://github.com/jonasraoni/mailSendFilter/blob/4c3984e1d12102542e3661da1cf4cb7af52489a0/MailSendFilterPlugin.php

Regards,
Alec Smecher
Public Knowledge Project Team