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.

CommentFileSizeAuthor
simplenews.send_test.patch551 bytesspiderman

Comments

DriesK’s picture

Thanks spiderman. No idea how that happened. I will fix it tomorrow.

DriesK’s picture

I'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.

DriesK’s picture

Status: Needs review » Fixed

Fixed by implementing hook_validate and (the new) hook_submit.

Anonymous’s picture

Status: Fixed » Closed (fixed)