Active
Project:
Simplenews Digest
Version:
6.x-1.x-dev
Component:
Documentation
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
10 Nov 2008 at 10:01 UTC
Updated:
4 Jan 2009 at 00:22 UTC
My auto generated newsletters are always marked as drafts (they go to the drafts tab) and are not sent automatically. I want to skip the step where I have to manually send them. Is this possible? How?
Thanks in advance.
Comments
Comment #1
Steve Dondley commentedSorry for the slow response. I wasn't set up to get a notification when issues are posted. If I'm not mistaken, each newsletter allows you to set a default state for newsletter issues. Make sure yours is set to "send".
Comment #2
mmilano commentedI'm having this problem too. The setting is set to 'send' for this newsletter.
In General Setting, the 'Default selection for sending newsletters' is set to 'Send newsletter'
When I edit any of the drafts, they already are set to 'send newsletter'.
Is there anything else to consider?
Comment #3
mmilano commentedNot sure if this will help or not, but I created some test code based on some debug code I found in the module, and I can get it to send the newsletters fine when I call simplenews_digest_inject_node().
Like this:
it just won't send when it runs on cron.
Comment #4
Steve Dondley commentedOK, I reviewed the simplenews module code and my memory is coming back to me on this. You must give anonymous users the ability to create a newsletter. This is a simplenews module permission. Give that a shot. I'm pretty sure that's the problem.
Comment #5
mmilano commentedHey Steve, I do appreciate the quick response.
I'll try it on my dev environment, but isn't this a huge security issue? Wouldn't anyone be able to pull up http://example.com/node/add/simplenews on any site running simplenews and send out newsletters to all subscribers?
Comment #6
Steve Dondley commentedThere is a separate permission for creating newsletters.
Comment #7
HANIAK commentedIt's an odd setting. I wouldn't figure that out by myself!
I'll give it a shot, and post the result...
Comment #8
HANIAK commentedIt didn't work...
I'll activate also the permission to "send newsletter" (which makes much more sense than creating)
any other suggestion?
Comment #9
Steve Dondley commentedLet me make this explicit: the "send newsletter" is the permission you want to give anonymous users, not "create newsletter".
Comment #10
mmilano commentedHah, same thing threw me off so I just enabled both and it worked fine. I'll take it back down to just send now.
Thanks Steve, you saved me a ton of time trying to figure that out on my own.
Comment #11
Steve Dondley commentedThanks, and I will be sure to put a note in the README to document this problem.
Comment #12
HANIAK commentedYeah, it worked! You only need to allow the anonymous user to "send newsletter" :)
Comment #13
Steve Dondley commentedComment #14
andrewlevine commentedSteve, is the reason that 'send newsletter' has to be on for anonymous users because the node is being sent by cron.php (anonymous)? If so, it seems like the best solution would be to temporarily change the user to uid 1 before sending. Would you accept such a patch?
Thanks,
Andrew
Comment #15
Steve Dondley commentedYeah, if you can write a patch that works and doesn't open up any security holes, that would be great.
Comment #16
Steve Dondley commentedFixed in Drupal 5 version. Still needed for drupal 6.