As stated in #1417634 for v1.0, Simplenews is NOT able to send newsletters to multiple subscribers lists, which is something most of people would expect from a newsletter module.
Since this is the only usable module I've found to massive send custom-themed nodes to subscribers lists, but lack one of the most important things, I've decided to do it myself.
However, the code was almost thought to be able to do so, so after a little research, I just had to create a function and modify 3 other functions, and now, Simplenews 7.x-2.x-dev is able to send newsletters to multiple groups/lists.
I'm uploading the patch and commiting the changes to the git repository (I hope I get it right, it's the first time I do so )
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | simplenews-7.x-2.x-dev-2153579-8.patch | 7.31 KB | PascalAnimateur |
| #5 | simplenews-7.x-2.x-dev-2153579-5.patch | 7.57 KB | neoxavier |
Comments
Comment #1
XoRDy commentedComment #2
XoRDy commentedComment #4
Moravec.To commentedIt works!
If you apply this patch, you will be able send newslleter to as many categories as you want.
But, if there are same email adresses subscribed to more categories, this will send duplicate emails.
Fix is very simple. Just add
on row 38 in simplenews.mail.inc (modificated function is below)
Comment #5
neoxavier commentedHello,
the patch attached basically combining the patch in #1 and the code in #4, I also did some coding-standard fix based on coder module.
I tested it and it work fine for me.
Comment #6
neoxavier commentedI changed the status to needs review so other people can review patch #5 and close this if it works
Comment #7
annared commentedHi,
is this working with simplenews_roles?
Thanks
Comment #8
PascalAnimateur commentedThe overview table in /admin/content/simplenews doesn't display the # of unique subscribers.
I've modified the query in simplenews_count_subscriptions to take this into account.
Here's a revised patch, I will check for compatibility with simplenews_roles later today.
Comment #10
PascalAnimateur commented@annared : I made a patch for simplenews_roles and it works great ! See my comment on the issue here
Comment #11
daveianoWhat about the 7.x-1.x branch? Release notes of the 7.x-2.x branch says: Do not use this, this is in heavy development mode and probably does not work.
So is it save to switch to 7.x-2.x branch?
Comment #12
PascalAnimateur commented@daveiano : By looking at the code from 1.x, I agree with what's been said in #1417634: Addressing multiple lists regarding the amount of work it would require for that branch.
Concerning the stability of 2.x, although I haven't tested it thoroughly in production environment, my initial tests seem to indicate it is quite stable as it is.
For the record, here's the drush make file excerpt with the patches I'm currently using to have simplenews-2.x with roles synchronisation:
Hope this helps!
Comment #13
anybodyThank you very much for your work. I think we can finally set this to needs review again and see if the 2 tests still fail and why. Let's get this very important feature commited!
BTW, is there an active simplenews maintainer willing to apply the patch to the dev branch if the problems are fixed?
Comment #14
anybodyOk, the failing test doesn't seem to be due to this issue. Could you please re-trigger testing (for me it did not seem to work) and set this RTBC if tests succeed?
RTBC from me for #8.