Your message has been sent.
This article has been saved to your account.
Go to my account
This article has been emailed to your Kindle.
Send this article
Complete the form below to send this article, Adding Newsletters to a Web Site Using Drupal 6, to a friend (or to yourself). We will never share your details (or your friend's) with anyone. For more information, read our Privacy Policy.
In this article by Mark Noble, we will introduce our imaginary client, the Good Eatin' Bistro, and discuss their plans to build a newsletter for their web site. We will add some new features which will allow Chef Wanyama, who is the owner of the Good Eatin' Bistro, a popular upscale restaurant, to keep his customers informed of current events at Good Eatin' restaurant. We will provide a new means of communication. The feature which is covered in this article is a quarterly newsletter that customers can subscribe to. The newsletter will contain valuable information from Chef Wanyama including coupons, news, recipes, and more.
Creating newsletters
A newsletter is a great way of keeping customers up-to-date without them needing to visit your web site. Customers appreciate well-designed newsletters because they allow the customer to keep tabs on their favorite places without needing to check every web site on a regular basis.
Creating a newsletter
Good Eatin' Goal: Create a new newsletter on the Good Eatin' site, which will contain relevant news about the restaurant, and will be delivered quarterly to subscribers.
Additional modules needed: Simplenews (http://drupal.org/project/simplenews).
Basic steps
Newsletters are containers for individual issues. For example, you could have a newsletter called Seasonal Dining Guide, which would have four issues per year (Summer, Fall, Winter, and Spring). A customer subscribes to the newsletter and each issue is sent to them as it becomes available.
- Begin by installing and activating the Simplenews module, as shown below:

At this point, we only need to enable the Simplenews module, and the Simplenews action module can be left disabled.
-
Next, select Content management and then Newsletters, from the Administer menu. Drupal will display an administration area divided into the following sections:
a) Sent issues
b) Drafts
c) Newsletters
d) Subscriptions -
Click on the Newsletters tab and Drupal will display a page similar to the following:

As you can see, a default newsletter with the name of our site has been automatically created for us. We can either edit this default newsletter or click on the Add newsletter link to create a new newsletter.
-
Let's click the Add newsletter option to create our seasonal newsletter. Drupal will display a standard form where we can enter the name, description, and relative importance (relative importance weight) of the newsletter.
- Click Save to save the newsletter. It will now appear in the list of available newsletters.
-
If you want to modify the Sender information for the newsletter to use an alternate name or email address to your site's default ones, you can either expand the Sender information section when adding the newsletter, or you click Edit newsletter and modify the Sender information, as shown in the following screenshot:


Allowing users to sign-up for the newsletter
Good Eatin' Goal: Demonstrate how registered and unregistered users can sign-up for a newsletter, and configure the registration process.
Additional modules needed: Simplenews (http://drupal.org/project/simplenews).
Basic steps
- To allow customers to sign-up for the newsletter, we will begin by adding a block to the page.
-
Open the Block Manager by selecting Site building and then Blocks, from the Administer menu. Add the block for the newsletter that you want to allow customers to subscribe to, as shown in the following screenshot:

-
We will now need to give users permission to subscribe to newsletters by selecting User management and then Permissions, from the Administer menu. We will give all users permissions to subscribe to newsletters and to view newsletter links, as shown below:

-
If the customer does not have permission to subscribe to newsletters then the block will appear as shown in the following screenshot:

However, if the customer has permissions to subscribe to newsletters, and is logged in to the site, the block will appear as shown in the following screenshot:

If the customer has permission to subscribe, but is not logged in, the block will appear as follows:

- To subscribe to the newsletter, the customer will simply click on the Subscribe button. Once they he subscribed, the Subscribe button will change to Unsubscribe so that the user can easily opt out of the newsletter. If the user does not have an active account with the site, they will need to confirm that they want to subscribe to the site.
Managing sign-ups
Good Eatin' Goal: Generate a list of all of the users who have signed up for a newsletter, and demonstrate how to remove suspicious users.
Additional modules needed: Simplenews (http://drupal.org/project/simplenews).
Basic steps
After customers have begun to sign up for your newsletter, you can view a list of all existing subscriptions by selecting Content management and then Newsletters from the Administer menu, and finally on Subscriptions. Drupal will display a page similar to the following image:

You can filter the display to list only specific newsletters, or to list only those newsletters that a specific customer has subscribed to. To edit individual subscriptions, click on the edit link. This will display a page similar to the following:

You can also activate, deactivate, or delete subscriptions by selecting the subscription you want to modify, selecting the appropriate action in the Update options dropdown list and then clicking the Update button. This allows you to remove malicious users who have subscribed to your newsletters. If you receive a significant number of invalid sign-ups, you may want to add a Captcha to the sign-up form.
Importing subscriptions from an existing list
Good Eatin' Goal: Import subscriptions from another list management system that was in use prior to you starting to manage your newsletter by using Simplenews.
Additional modules needed: Simplenews (http://drupal.org/project/simplenews).
Basic steps
If you already have a large list of subscribers to your newsletter, you probably wouldn't want to throw this list away because a good contact list takes time to build and can be very lucrative for you.
You can import a comma-delimited list of email addresses by clicking on the Mass subscribe link from the Newsletter administration page. This will display a page similar to the following:

Simply copy and paste the list of email addresses from your current management system and then click update. Drupal will display a list of addresses that were added.
Creating a new issue of the newsletter
Good Eatin' Goal: Build a new issue of the seasonal specials newsletter in preparation for it to be sent to newsletter subscribers.
Additional modules needed: Simplenews (http://drupal.org/project/simplenews).
Basic steps
- Creating a new newsletter issue is similar to creating any other page within Drupal. We will begin by clicking on Create content and then on Newsletter issue.
-
This will display a form where you can select the newsletter for which you want to create an issue, and can enter information about the issue, as shown in the following screenshot:

-
You can also modify the sending options to indicate whether newsletter should be sent to all subscribers, to just a test address, or should simply be saved as a draft.

It is highly recommended that you send a test newsletter before you send it to the entire subscription list to prevent errors in the final newsletter. The test address defaults to the administration email address for your site. You can change the test address on the Simplenews Settings page, which is accessed by selecting Site configuration and then Simplenews, from the Administer menu. The available settings are shown in the following screenshot:

- When you are satisfied with your issue, click the Save button.
- After you have sent a test email and checked that it was delivered correctly, you can send the newsletter to the full list of subscribers by editing your draft and then changing the Newsletter sending options to Send newsletter.
-
Once the newsletter has been scheduled to be sent, it will be sent to a portion of the subscriber list each time that cron is run. This is done to avoid flooding the network. You can configure the number of emails that are sent each time that cron is called by editing the Mail backend settings for the Newsletter, which is accessed by selecting Site Configuration and then Simplenews from the Administer menu. The available settings are shown in the following screenshot:

By default, only 20 emails are sent each time that cron is run. This is fine, if you are running cron frequently, but if you are running it less frequently, you may want to increase the number of emails that are sent each time. Some web hosting companies only allow a specific number of emails to be sent every hour, to help prevent spammers from utilizing their servers. Before sending newsletters to large mailing lists, you should check with your host to ensure that you comply with their policies.
About the Author :
Mark Noble
Mark Noble has worked in software development and website design for over 13 years in a variety of capacities including development, quality assurance, and management. He takes pride in developing software and websites to make businesses run more effectively and delights in helping users to get their jobs done more easily.
Mark currently works developing websites to help libraries manage their books. He also does occasional contract work for clients in a variety of industries.
When he isn’t in front of a computer, Mark enjoys playing with his family, photography, and geocaching.



Post new comment