So I'm trying to setup SimpleNews and Views and I thought this module would make it possible to send this view out as the newsletter...unfortunately, it looks like it will send the exact same newsletter over and over.

Is that the intended function of this module? It will only send the newsletter content-type's body, title, etc?

Comments

avilao’s picture

broon’s picture

paultrotter50’s picture

I've just set this up successfully using EVA: Entity Views Attachment

Basically you set up your view as normal in views and check its working in a block. Then in View add a display of the type 'EVA field'. In Entity content settings you need to use Entity type: Node and then say the content type you wish to attach the view to in Bundles: your content type.

So that attaches a view to a content type. Now you use that content type to generate your newsletter from.

You may want to follow the question I'm about to ask on here: 'how to only send a weekly newsletter if the attached view contains items'.

Matt B’s picture

Issue summary: View changes

How do I configure simplenews / simplenews schedule / insert_view to insert the content that the user subscribing to the newsletter can see, not the anonymous user? I can not see a way for this to work where access controls allow the users to see more content than the anonymous user...

broon’s picture

Matt, just to clarify. You have a node and a view. The view is attached to the node by using insert_view but it is only accessible by authorized users while the node itself can be viewed by anonymous users?

If that's the case, you will have no luck with on-board tools when using Drupal 7. From the documentation:

Note that as of Drupal 7, cron always runs as an anonymous user, so this will not work in Drupal 7 and later versions!

Only way I can think of is by using the systems cron daemon to run drush as a specified user sending the newsletter. However, I haven't tried that and I am not sure this will work, e.g. simplenews might by blocking restricted content as well.

miro_dietiker’s picture

In case you have real users as subscribers, the Simplenews cron switches into the recipient user context when rendering the mail.

Matt B’s picture

It renders the newsletter views as the anonymous user when you select "Send one test newsletter to the test address", works fine when sent as part of a schedule.