Simplenews: Send newsletters to subscribed e-mail addresses

Last modified: October 30, 2009 - 07:52

Simplenews Simplenews publishes and sends newsletters to lists of subscribers. Both anonymous and authenticated users can opt-in to different mailing lists. HTML email can be sent by using Mime mail module.

Dedicated handbook pages are available on: sending emails and theming newsletters.

Requirements

Installation

  • Create a new directory "simplenews" in the sites/all/modules directory and place the entire contents of this simplenews folder in it.
  • Enable the module on the Modules admin page: Administer > Site building > Modules
  • Grant the access at the Access control page: Administer > User management > Access control.

Configuration

Configure Simplenews on the Simplenews admin pages: Administer > Site configuration > Simplenews.
Select a content type to use as newsletter, select a vocabulary which tags will be newsletter series.

Access control

To enable users to (un)subscribe to a newsletter use the "subscribe to newsletters" permission. This will enable the subscription form in the Simplenews block and give access to the subscription page at /newsletter/subscriptions.

To restrict the access for different newsletters only to its audience you may use some of the access control modules like Taxonomy Access Control Lite.

Simplenews blocks

With the Simplenews block users can subscribe to a newsletter. For each newsletter one block is available.
Enable the Simplenews block on the Administer blocks page: Administer > Site building > Blocks, and visit the block configuration page to configure the block settings. Permission "subscribe to newsletters" is required to access the subscription form in the simplenews block or to view the link to the subscription form.

Simplenews block theming

More control over the content of simplenews blocks can be achieved using the block theming. Theme your simplenews block by copying simplenews-block.tpl.php into your theme directory and edit the content. The file is self documented listing all available variables.
The newsletter block can be themed generally and per newsletter:
* simplenews-block.tpl.php (for all newsletters)
* simplenews-block.tpl--[tid].php (for newsletter series tid)

Multilingual support

Simplenews supports multilingual newsletters for node translation, multilingual taxonomy and url path prefixes.
When translated newsletter issues are available subscribers receive the newsletter in their preferred language (according to account setting). Translation module is required for newsletter translation.

Multilingual taxonomy of 'Localized terms' and 'per language terms' is supported. 'per language vocabulary' is not supported. I18n-taxonomy module is required.

Use 'Localized terms' for a multilingual newsletter. Taxonomy terms are translated and translated newsletters are each taged with the same (translated) term. Subscribers receive the newsletter in the preferred language set in their account settings or in the site default language. Use 'per language terms' for mailing lists each with a different language. Newsletters of different language each have their own tag and own list of subscribers.
Path prefixes are added to footer message according to the subscribers preferred language.

The preferred language of anonymous users is set based on the interface language of the page they visit for subscription. Anonymous users can not change their preferred language. Users with an account on the site will be subscribed with the preferred language as set in their account settings.

what to do in access control page

amysragbag - February 13, 2009 - 23:03

Hi,

I'm getting a 406 error when I try to configure simplenews and my host said I should be able to send newsletters, so I'm going through the steps to see what I missed. I'm a little mystified by this step:

Grant the access at the Access control page: Administer > User management > Access control.

What do I need to put here in order to be able to send newsletters?

I'm using drupal 6.9 and Simplenews 6.x-1.0-rc5

Thanks so much.

edit: Nevermind! I came back and tried again and it works now. :)

How to submit name with email in newslatter for anonymous user ?

irfanzone - March 12, 2009 - 13:39

please suggest me how can I add a text box to submit name like email and subscribe and unsubscribe radio buttons in drupal 5.14 simplenews module .

You may need go to

dan.hu - August 21, 2009 - 11:21

You may need go to Users->Permissions and turn on the "subscribe to newsletters" permission for anonymous user.

Handbook clarification request

eff_shaped - March 17, 2009 - 15:31

In the handbook text, I'm not clear on a couple of things:

Under Configuration
"... Select a content type to use as newsletter, ..."
If I want a layout/design for my newsletter, different from my other content, should I have that content type set up in advance of this step? If so, the documentation should maybe say this.

and

...select a vocabulary which tags will be newsletter series."
Sorry, this part of the sentence makes no sense to me, can it be corrected or explained differently?

How can i sand translated issue?

solomenikm - April 1, 2009 - 12:53

Hi! I create and send issue for example in English, then i translate it in Spanish and see something like : "This newsletter issue is part of a translation set. Sending this set is controlled from the translation source newsletter." but the href of " translation source newsletter." is "http://mysite.com/node/" how and wear can i sand this issue?
P.S. Taxonomy terms and translation is is OK, according to instruction :) Thank you very match !!!

Alter the input to have value="enter email"

doublejosh - May 12, 2009 - 00:12

I'd like to have a value in the form input with "enter email" that disappears on click... you know the one.

The $form variable in the simplenews-block.tpl.php file is a string, so I haven't gone deep enough.
I looked at the template pre-process function, but that didn't seem like the right place either.

JQuery Swap

doublejosh - July 27, 2009 - 20:38

Here's what I ended up doing...

<?php
$newsletterTextjs
= '
$(document).ready(function() {
     var message= "Get Our Newsletter";
     $("#block-simplenews-5 #edit-mail").val(message);
     $("#block-simplenews-5 #edit-mail").focus( function() {
      if ($(this).val() == message) { $(this).val(""); }
     });
     $("#block-simplenews-5 #edit-mail").blur( function() {
       if ($(this).val() == "") { $(this).val(message); }
     });
});
'
;
drupal_add_js($newsletterTextjs, 'inline');
?>

Remove the User from the Form

dhook - May 27, 2009 - 19:00

What is the best way to remove the user from the form? This is what is in the simplenews_block_form method in the module.

($form['display_mail'] = array(
'#type' => 'item',
'#title' => t('User'),
'#value' => check_plain($user->name),
);

How would I remove it from within the simplenews-block.tpl.php

Thanks

Is there a prebuilt listing page for all newsletters?

nvisioncurtis - August 13, 2009 - 16:49

I want to have a page to have a page that list all newsletters. I could create a View of the content type but does this function already exist?

Seems like there should be a page like /newsletters

seconded. this seems

goodeit - September 12, 2009 - 16:26

seconded. this seems necessary.

Problem of security

Antton - August 28, 2009 - 09:08

The user has access not only to their subscription page, but can view/edit any of the pages of other users.
http://mysite.ru/user/!USER ID!/edit/newsletter

How do fix?

Check the rights.

spade - August 28, 2009 - 16:24

Check the rights.

subscribe to newsletters

Antton - August 31, 2009 - 10:37

Registered users can subscribe to newsletters.
All other rights module "newsletters" and module "user" are disabled. It does not help.

Problem in the version for drupal 6!

Error sending - Address can not contain Spaces

gordon.waters - October 1, 2009 - 03:02

Hi there,

I am using Simplenews 6.x-1.0-rc6, and I am having trouble with it sending the newsletters, It seems that the code may be messing the the email addresses and not writing it correctly.

The error I am seeing is this;

--12863.10636896
Content-type: Text/Plain; charset=US-ASCII
Content-Disposition: Inline
Content-Description: Reason for delivery failure.

The attached message has failed delivery and has been referred
to you as postmaster. The following error report or reports
were given to explain the problem:

--- Problems not related to specific addresses in the message:
501 syntax: Recipient cannot contain a space (< )
*** xxxxxxx@gmail.com

--12863.10636896
Content-type: Message/RFC822

Received: from spooler by localhost (Mercury/32 v4.62); 1 Oct 2009 11:25:20 +1000
Received: from Jaspa (127.0.0.1) by localhost (Mercury/32 v4.62) ID MG000010;
1 Oct 2009 11:25:12 +1000
Date: Thu, 01 Oct 2009 11:25:12 +1000
Subject: [Daniel Walker newsletter] First Newsletter
To: xxxxxxx@gmail.com
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed; delsp=yes
Content-Transfer-Encoding: 8Bit
X-Mailer: Drupal
Errors-To: xxxxxxx@gmail.com
Sender: xxxxxxxx@gmail.com
From: "DaneilWalker"
Precedence: bulk
List-Unsubscribe:
Message-ID:

Cannot get simplenews block to display for anyone.

baldychap - October 1, 2009 - 16:19

Hi All,

I'm a newbie with Drupal, so please bear with me, I'm running 6.14 of drupal and the 6.x-1.0-rc6 version of simplenews.

I've enabled the module and managed to post a newsletter to the front page, but I can't for the life of me get the simplenews block to display. It's showing as enabled in the blocks menu (to show in the right sidebar) and I've given permission for anonymous users to subscribe in the permissions page. So far no simplenews block is shown for anonymous users or for users who are registered and logged in.

Does anyone know what I'm doing wrong?

Thanks. :-)

Environment?

captaindav - October 5, 2009 - 13:45

Hello,

I am trying to help Sutharsan support the SimpleNews project - and am new, but would be happy to work through this issue with you.

Could you please try upgrading to the lastest dev release (6.x-1.x-dev), to see if any bugs have been fixed that might be causing this issue?

I took a stock copy of 6.14, installed SimpleNews 6.x-1.x-dev, and copied the BlueMarine theme to a test theme in my /sites/all/themes directory. The block displayed fine in this case, so I wonder if it has something to do with the theme you are using or some other setting in your Drupal environment.

Have you tried putting one of the default system blocks (e.g. Who's online) in the right sidebar? That would verify that the region is configured properly in your page template and .info file.

Have you flushed all system caches? I would recommend installing the Admin Menu, as this has a convenient "Flush All Caches" option in the leftmost dropdown menu activated by clicking the Drupal icon on the far left.

I'm trying to embed the

andymilk - October 7, 2009 - 18:16

I'm trying to embed the newsletter subscription form in a page.

I've used this:
print drupal_get_form('_simplenews_subscription_manager_form');

When I submit the form, however, I don't see the subscription added. It also simply shows the same form rather than any sort of message.

Any ideas?

Block should work

captaindav - October 10, 2009 - 06:50

Have you tried using the simplenews block, that should work?

Simplenews for newsletter displayed at the website

anyahuang - October 12, 2009 - 07:50

Hi all,

Sorry everybody, I am a newbie for DRUPAL. I have download and installed Simplenews. And I just use the simplenews to display the newsletter on my website without sending email. And I have copied simplenews-newsletter-body.tpl.php and simplenews-newsletter-footer.tpl.php to the theme path.

But when I create a newsletter issue, it always show the page under the current theme. I want to the newsletter only display the body instead of together with the top header and menus.

Anybody can give me clues about what has missed out? I am using Drupal6.14

Thanks in advance.

Cannot send to subscribed mails, How do solve to be automatic??

joel09 - October 30, 2009 - 07:58

I can send newsletter to test email address but I cannot send to subscribed mail addresses, on sent items it shows a tick with blue and not red, How can I solve this problem in such a way that on subscription someone receives the newsletter automatically, please help me....

URL's to common newsletter pages

Karlheinz - November 6, 2009 - 15:45

I didn't see this info in any of the handbook pages, so I added this as a comment here.

There are a couple of direct links that any visitor can use to access newsletters. I've gathered that info below. Obviously "www.example.com" should be replaced with your Drupal installation's URL.

Subscribing to newsletters, and managing your subscriptions:
http://www.example.com/newsletter/subscriptions

To view sent issues of the "my-news" newsletter:
http://www.example.com/category/newsletter/my-news

This is with Clean URL's enabled. You would need to put "?q=" after "example.com/" if they are not.

If anyone has others I don't know about, I'd love to hear about them.

-Karlheinz

 
 

Drupal is a registered trademark of Dries Buytaert.