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
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

Steve Dondley - November 25, 2008 - 23:07

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

mmilano - November 26, 2008 - 04:04

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

mmilano - November 26, 2008 - 04:32

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

Steve Dondley - November 26, 2008 - 04:44
Status:active» postponed (maintainer needs more info)

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

mmilano - November 26, 2008 - 05:03

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

Steve Dondley - November 26, 2008 - 06:33

There is a separate permission for creating newsletters.

#7

HANIAK - November 26, 2008 - 14:36

It's an odd setting. I wouldn't figure that out by myself!
I'll give it a shot, and post the result...

#8

HANIAK - November 27, 2008 - 16:08

It didn't work...
I'll activate also the permission to "send newsletter" (which makes much more sense than creating)
any other suggestion?

#9

Steve Dondley - November 27, 2008 - 16:28

Let me make this explicit: the "send newsletter" is the permission you want to give anonymous users, not "create newsletter".

#10

mmilano - November 27, 2008 - 18:01

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

Steve Dondley - November 27, 2008 - 18:10

Thanks, and I will be sure to put a note in the README to document this problem.

#12

HANIAK - November 28, 2008 - 09:47

Yeah, it worked! You only need to allow the anonymous user to "send newsletter" :)

#13

Steve Dondley - November 29, 2008 - 03:15
Title:Newsleter is not sent» Documentation on how to configure permission needed
Component:Miscellaneous» Documentation
Category:support request» task
Assigned to:Anonymous» Steve Dondley
Status:postponed (maintainer needs more info)» active

#14

andrewlevine - January 3, 2009 - 09:46

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

Steve Dondley - January 3, 2009 - 18:01

Yeah, if you can write a patch that works and doesn't open up any security holes, that would be great.

#16

Steve Dondley - January 4, 2009 - 00:22
Version:5.x-1.0» 6.x-1.x-dev

Fixed in Drupal 5 version. Still needed for drupal 6.

 
 

Drupal is a registered trademark of Dries Buytaert.