Sending an item to multiple newsletters

Created on 24 August 2015, about 9 years ago
Updated 2 April 2024, 8 months ago

Motivation

Sending a single content item to multiple newsletters would be a very useful feature. It enables a site to have different newsletters that visitors can subscribe to - for example for different roles or different interests - and then the site owners can send content items that are relevant to more than one interest or role without needing to create duplicate content items. Furthermore, subscribers that are on more than one of the target newsletters should only receive a single copy of the email.

Simplenews does currently not allow a single content item to be sent to multiple newsletters; if one attempts to work around this by cloning items with Rules, duplicate emails would get sent to subscribers on both lists.

Proposed solution

Various options...

Multi-valued simplenews_issue field

We would leave the issue field as single-value by default, but fix the code to work if the site-admin alters the cardinality (can do in the normal way through the field settings GUI).

  • Fix SpoolStorage to add a loop, and clever SQL code to avoid duplicates.
  • The catch with this option is that we now have multiple status/count/handler settings fields. This will need careful handling in the UI (NodeTabForm and SendStatus).

Patch #31 is a start towards this, but has problems described in #39.

New entity type for simplenews_issue

Instead of a simplenews_issue field we could have a separate simplenews_issue entity type. This can have a multi-valued entity reference field but still stick with a single copy of status and count. This would also solve #3053111: Issue status should not be stored on issue entity β†’ .

RecipientHandler

Create RecipientHandlerMultiple as described in #40 but it has flaws described in #42.

✨ Feature request
Status

Needs work

Version

3.0

Component

Code

Created by

πŸ‡¬πŸ‡§United Kingdom jonathanshaw Stroud, UK

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡ΈUnited States SocialNicheGuru

    the patch no longer applies to simplenews 4.x

  • πŸ‡ΊπŸ‡ΎUruguay gonzalo2683

    Hi Jonathan(@jonathanshaw), how are you? I've been facing a similar issue. I implemented a custom handler with checkboxes, but when saving the node for the first time, the values aren't stored in the database. However, if I edit the node and save again, the checkboxes are saved correctly.

    I haven't found a solution yet. I saw your comment #67, but what you mentioned didn't work for me.

    Do you know any way to address this issue? I would really appreciate any help.

    Best regards.

  • πŸ‡¬πŸ‡§United Kingdom jonathanshaw Stroud, UK

    @gonzalo no idea I'm afraid

Production build 0.71.5 2024