Documentation on how to configure permission needed
HANIAK - November 10, 2008 - 10:01
| Project: | Simplenews Digest |
| Version: | 6.x-1.x-dev |
| Component: | Documentation |
| Category: | task |
| Priority: | normal |
| Assigned: | Steve Dondley |
| Status: | active |
Jump to:
Description
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.

#1
Sorry 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".
#2
I'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?
#3
Not 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:
variable_set('simplenews_digest_start_time', time() -86400);
variable_set('simplenews_digest_end_time', time() + 3600);
variable_set('simplenews_digest_last_time_sent', time() - 86400);
simplenews_digest_inject_node();
it just won't send when it runs on cron.
#4
OK, 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.
#5
Hey 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?
#6
There is a separate permission for creating newsletters.
#7
It's an odd setting. I wouldn't figure that out by myself!
I'll give it a shot, and post the result...
#8
It didn't work...
I'll activate also the permission to "send newsletter" (which makes much more sense than creating)
any other suggestion?
#9
Let me make this explicit: the "send newsletter" is the permission you want to give anonymous users, not "create newsletter".
#10
Hah, 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.
#11
Thanks, and I will be sure to put a note in the README to document this problem.
#12
Yeah, it worked! You only need to allow the anonymous user to "send newsletter" :)
#13
#14
Steve, 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
#15
Yeah, if you can write a patch that works and doesn't open up any security holes, that would be great.
#16
Fixed in Drupal 5 version. Still needed for drupal 6.