The solution of implementing the mail subscription push system by Drupal

Source: Internet
Author: User
Tags php file test email address drupal

e-mail marketing, known as an EDM, is an acronym for Email Direct Marketing, a network marketing tool that delivers value information to target users in the form of e-mail, with the prior permission of the user. Mail push is one of the most effective means of interacting with users, so any one platform needs to communicate with users, mail push system is an essential link.

This article mainly explains how to use Drupal to build a mail push system, to achieve user subscription mail delivery.


This article refers to: http://www.wdtutorials.com/...

The first step, the installation module simplenews, MailSystem, Htmlmail.

Simplenews is the core module for mail management delivery, enabling Simplenews to have a content type that creates new Newsletter,mailsystem and htmlmail, setting the message output and formatting.

The second step is to create the newsletter.

A. Set up a test address admin/config/services/simplenews/settings

B. Creating newsletter Node/add/simplenews

C. After the creation is done, go to Newsletter tab, and click Send Test

To set a screenshot of the test email address:


At this point, we can go to the test email address to see if we have received this message (involving local sendmail system and inbox to block spam messages).

This two steps to complete a basic mail management and send, note that the delivery here is SendMail, that is, the system's own send mail program, a little we explain how to replace.

Step three, Simplenews advanced settings.

A. Default settings

Admin/config/services/simplenews/settings

There are many setting points: The default format, test Inbox, sender, confirmation email template, cron number of senders, etc.

B. Create a simplenews category, and then set up a mail delivery configuration within a specific category

Admin/config/services/simplenews

Fourth step, system mail settings? Drupal Mail System

A. Admin/config/system/mailsystem

NEW SETTING Inside Select Simplenews, click Save.

B. MAIL SYSTEM SETTINGS There will be a Simplenews module class, select Htmlmailsystem, click Save.

To add a screenshot of a message to the Simplenews module:


After saving, select the message processing module for Simplenews:


Fifth step. Message output: Htmlmail templates and Simplenews formatter

A. HTML Mail infrastructure settings

Admin/config/system/htmlmail

Step 1 View the TPL files and debug properties

Step 2 Select the theme to use, select a simple theme or current theme.

Note that this theme determines where the Htmlmail template needs to be placed.

Step 3 output Formatter settings.

Recommend a new formatter for newsletter, install several recommended filter, such as Emogrifier.

B. Simplenews output format (all HTML selected)

The default formatter is: Admin/config/services/simplenews/settings

Specific simplenews classification of formatter in: Admin/config/services/simplenews

If the category is formatted as HTML and unsuccessful, then the default formmater is also set to HTML

Here, you can test the effect of sending a message to see if the message format is correct.

There are two ways to set up the content body and content type of a message:

1. Through the body of node, can not be sent out with the content of the same body of the message.

2. By customizing the field, and then assembling in the TPL, different display results are not the same.

The issues to be noted:

Simplenews related template of the TPL specific under the simplenews, need to be copied to the theme below, is generally seven (oneself test why put under the current theme do not), so it is recommended to directly modify the Simplenews module under the TPL.

The main role of the Htmlmail TPL is to wrap the simplenews, copy the htmlmail?simplenews.tpl.php file to the specified theme or under the current theme (this theme can be set in the Htmlmail module). You can then wrap the information you want outside the htmlmail-body tag.

The Htmlmail TPL can be used for wrapping the headers and tails of the message, such as the logo of the head of the mail, the copyright information of the tail, etc.

Step six, the Subscriber admin address for the message: admin/people/simplenews

Step seven, use cron to send: Admin/config/services/simplenews/settings/mail


Set up to complete the above steps, a Simple mail push system is built, Drupal inside the main or manage the message content and push the user information, subscribe and other information, real send mail or system sendmail, if need more efficient send, can install Postfix. Considering the authentication of the mail, the reverse resolution of the domain name, SPF and spam processing, you can consider using a third party's sending system, this time, we can install Drupal's SMTP module.


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.