the updated simplenews module (for 4.7) is working great for me, but i noticed that i couldn't send test newsletters anymore. i've tracked down the problem to a relatively minor issue with the comma-separated list of recipients that the module accepts.
the simplenews_send_test function was treating this list as a single email address, and thus the foreach loop to actually send the test newsletters was never being run. the patch is a simple two-line fix that explode()s the $recipients list before the foreach, and then trim()s the individual list addresses to remove any extraneous whitespace.
| Comment | File | Size | Author |
|---|---|---|---|
| simplenews.send_test.patch | 551 bytes | spiderman |
Comments
Comment #1
DriesK commentedThanks spiderman. No idea how that happened. I will fix it tomorrow.
Comment #2
DriesK commentedI've investigated this more thouroughly. Despite the fact that simplenews works with the new forms API, it hasn't been fully updated yet to the form execute model. Because of that, and because the validate hook now works a little different than before, the test mailing is broken. Your patch works, but probably a cleaner solution is possible. I'll have to think it over again.
Comment #3
DriesK commentedFixed by implementing hook_validate and (the new) hook_submit.
Comment #4
(not verified) commented