Please note that this is not intended to be a complete tutorial but a quick kickstart to create from scratch a newsletter website on Drupal infrastructure
For more deep information please follow these links:
And check the full list of newsletter solutions provided on Drupal: https://www.drupal.org/node/645108
We will base this solution on the simplenews module and other related modules.
In order to have the newsletter features first install the module simplenews, just pick the last version from the module page: https://www.drupal.org/project/simplenews and install it locally into your drupal website.
After enabling the module you will have all the base functionality to manage your newsletters.
Important urls for using the base module are:
Configuration->Web services-> Newsletters
There you can manage and create new newsletter categories. (By default one category is created)
List of subscribers:
The complete list of subscribers to your newsletters can be found on the next url,
You can find complete help for the module after installing and enabling it by going to:
Basic newsletter configuration
The first thing to do after installing and enabling the module will be to check the default configuration and change it accordingly to your needs.
For a basic newsletter solution default values should be enough, and they can be overridden by the concrete newsletter category configuration later on.
If special e-mail account or name to send the newsletters is needed, change it on the Sender Information section
Sending option configuration
Better review the configuration for sending the newsletters e-mails. Cron will send newsletters and it’s configured on the infrastructure to run automatically every 30 minutes.
If needed to send more e-mails per cron run, adjust the “Cron throttle” value as suggested on the configuration form. But please note that higher values on this value might exceed the PHP maximum execution time, so should be balanced based on logs entries for past sending campaigns.
Next will be to adapt from your security schema the permissions for managing newsletters and allow subscriptions.
Just go to the normal People-> Permissions form
There will be a new Simplenews section with the permissions to administer the different options of the module but also to select who can subscribe to newsletters.
Also you need to define who will be able to create/edit/delete the newsletters.
Blocks for subscribing
There are two different types of blocks to allow users to subscribe to the newsletters.
One Multi Subscription block that will allow users to select between all the available newsletter categories defined in the site and subscribe to them.
And a set of blocks, one per each Newsletter Category defined on the site, to subscribe to one particular newsletter.
Decide which option you prefer and place the block on any region of your site, as you would do for any other block.
View/configure the newsletters
Previously we covered how to do the basic configuration and default values for the newsletters. Now we will see how to make specific configurations for each newsletter category. That allows different output formats (plain text or HTML) or different Sender information for each of the newsletters in the site.
Go to Configuration -> Newsletters
For each newsletter category you created there is an edit button. There you can override the default newsletter configuration and customize for specific newsletters. For example change the output format from plain text to HTML.
Once everything is configured, permissions assigned and we allow user to subscribe to the newsletter we can start using the module and create newsletters.
The newsletters are represented by the Content Type “Simplenews newsletter”, so in order to issue a new newsletter you just need to create a new content from this Content type.
The content type is quite simple with a title, Body (the newsletter content) and a selector for the newsletter category.
Important, recently created newsletters are not sent automatically. It must be manually sent by some administrator as we will cover in the next chapter.
The default Send option can be overridden from the Newsletter tab when editing a newsletter.
View status of newsletters
The complete set of newsletters created on the site can be accessed by going to Content and then selecting the Newsletters tab.
There you can see the status of each newsletter, publish status, sending status and number of subscribers.
This form also allows initiating the send of several newsletters at the same time (on the “Update options” section)
There are two options to send the newsletters.
Note that both options mark the newsletter to be sent and will be done on the next cron run.
- From Content -> Newsletter form, select the newsletter/s to send and then click on the “Update” button with the option “Send” selected. Important: This will trigger the default send option (by default only sends a test newsletter to the test address defined, but as explained before can be overridden to send the newsletters to subscribers)
- From the Newsletter content, just go to the node of the newsletter and select the “Newsletter” tab. A form with the send options will be presented.
Manual subscribe users/egroups (as administrator)
As administrator of the site you can subscribe yourself users into the newsletters. That can be useful if you want to distribute the newsletter to a well-defined closed set of users/egroups instead of letting the users to subscribe themselves.
You can access this functionality thought the “Newsletter subscriptions” option inside People on the admin menu. (https://<YOURSITE>.web.cern.ch/admin/people/simplenews)
Using the Mass subscribe option you can provide a list of email addresses where the newsletter will be sent.
In the following example I’m adding the e-group ‘eduardo-test’ to the list of subscribers of the ‘Newsletter for IT People’
Sending newsletter with HTML instead of Plain text
If needed to send a newsletter that contains HTML elements like images, this can be done with the help of some other modules.
Two modules need to be installed (at the moment of writing this document neither of them is centrally managed)
- Mail System (https://www.drupal.org/project/mailsystem)
- Mime Mail (https://www.drupal.org/project/mimemail)
Change Mime Mail configuration to use FULL HTML format.
On https://<YOURSITE>.web.cern.ch/admin/config/system/mimemail change the “E-mail format” to Full HTML.
For each Newsletter category change the Email settings and select “HTML” as the Email format. (see “View/configure the newsletters” section to find where this setting is)
Now the content of the newsletter can contain any html tag.