Future of the SimpleNews Module

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
kwinters's picture

This discussion is an extension of an IRC session with Sutha and others, with a goal of finding the best way forward.

Simplenews is in an unfortunate situation right now where it is OK for text newsletters but difficult for HTML, and also doesn't provide a good framework for going outside the box. The module needs to be small enough to be maintainable, but still capable of meeting all needs.

I believe we'll need to reorganize the module into different components to accomplish this.

Sending emails: Drupal core supports text emails, mailmime supports HTML reasonably well. However, mailmime doesn't work in a way that makes it easy for simplenews to send really good HTML emails, with carefully crafted raw text alternatives, etc. So, we will create a mail-sending API which simplenews can delegate the message construction and send to. This module would also be usable in custom projects for sending HTML emails, and also allow easy HTML replacements for emails generated by Drupal Core. This module will also accept plain text emails and do the delegation automatically, so that Simplenews, etc. doesn't need to worry about the contents of the email.

Scheduling emails sends: In all likelihood the Simplenews base module will need to handle this, but the email API module should make it easy. It may be possible to split into a simplenews sub-module.

Newsletter signup, subscription management, newsletter issue node type: Simplenews base module.

Newsletter statistics, bounces, etc. - a set of sub-modules for Simplenews. Enable what you need / want.

Email templating: Allow you to organize your html emails into regions and add blocks, just like with pages. This could be a separate module that requires the email API, which Simplenews will be only agnostic of (needs to accept a message body from Simplenews but also work for Drupal core emails).

Advanced Email Content: Email subject, multiple CCK fields for body (or other region) HTML, and a textarea for manually crafting a good plain-text alternative. It would need some way of mapping the fields and act on the mapping as the node is being converted into email content. Although this is primarily Newsletter functionality, it may not be simplenews specific.

Other custom email functionality support: Let's say you want to send a referral email when a custom form is submitted. You will establish an email template for your site, generate tokens, and render a node as an email using the tokens and template. This process should be painless.

As for mailmime: It doesn't appear that it was designed as an API, and Simplenews doesn't interface with it very well. There are also some other problems with it, since it doesn't easily allow you to wrap an email's body content in any HTML and the CSS support is messy. These problems don't really appear until you want to do something fancy, but when they do appear it's easier to roll your own multipart email formatter than use mailmime. Still, the mail API module would be based heavily on mailmime.

I am going to be doing a lot of the work myself for a project regardless (D6), but I'd like the the solution I end up with to be extensible to any other realistic need.

Comments

eNewsletter

Robert Castelo's picture

eNewsletter covers a lot of what you've outlined:

http://drupal.org/project/enewsletter

I've just committed the latest version - going to wait a month and fix any bugs that are found in the Drupal 5 version, then I'm going to upgrade it for Drupal 6 and 7.

Testing, documentation and patches welcome!

Looks Promising

kwinters's picture

I think you're headed in the right direction with this, particularly with the code divisions. The biggest problem with simplenews / mimemail right now is that they both do too much and too little at the same time, rather than splitting up distinct tasks into different modules.

Unfortunately since it's D5, not exactly what I need, and too complex for me to both port and improve I think I'm still in the same boat and am better off trying to work with SimpleNews.

However, there will be some overlap and we might be able to share some modules. Everything that is not newsletter-specific (sending html emails, send node as email, use blocks in html email, etc.) could be used by your suite as well. Deliver is a little overly specific for me to use it, mostly just because the settings are a little limiting as opposed to a module that is purely an API.

In eNewsletter the scheduling aspects seem a little strange to me. In SimpleNews, I like that I have "Newsletters" as taxonomy that are subscribed to, and when I went to send out an email blast, I make a new node. I don't see the utility in scheduling monthly, etc. sends.

Ken Winters

I can definitely see that

joachim's picture

I can definitely see that some sites may want an automatic email every month that is basically 'what's new this month'.
Most clients will want to customize this, include some editorial text, etc -- in which case it's just a simplenews newsletter with embedded views.
But some may want a totally automated system that basically shoots out the result of a view on a regular basis.

Notifications

kwinters's picture

Currently I'm investigating the notifications and messaging modules as a better base for a newsletter system. They are very popular, modular, and already have some overlap with a newsletter system.

Overall that seems like a better end solution than trying to maintain separate notification and newsletter systems, but there is more work up front before I'd have anything to show for it. For example, I'd also have to port the simplenews analytics, bounce, etc. modules to notifications before it would make sense to switch away from the old simplenews.

Ken Winters

We're also looking for a good

bdwelle's picture

We're also looking for a good unified messaging solution. To begin with we need to do an (semi-)automated newsletter with recent content updates, and SimpleNews and SimpleNews Digest seems to be directed at exactly this, but not current for D6. Notifications & Messaging seems more up to date, modular, and more flexible, but I'm not clear on how to do what SimpleNews Digest purports to do with Notifications & Messaging... what's the best way to auto-generate a message with recent content?

I am also interested in being

jct's picture

I am also interested in being able to generate a newsletter with recent site posts. Notifications and Messaging to my knowledge doesn't give quite the same control over subscriber lists and content (for the sender) as SimpleNews/SimpleNews Roles. Yet, it's not exactly easy to pull views into a newsletter. To me, neither seems "best" at the moment, but perhaps a collaboration between the maintainers could bring about a system of notifications, templating, etc that would work well for both.

Newsletter signup,

joachim's picture

Newsletter signup, subscription management -- I think this could do to be abstracted.
There are lots of cases where other modules may wish to step in and change who receives mail or a newsletter. Currently this requires hacking about with what simplenews does.
Cases such as:

  • signup module wants to make a newsletter go only to users signed up to an event
  • ubercart wants to make a newsletter go to people who have bought things
  • simplenews_roles just syncs to a role.

What I've been pondering is a sort of hook_subscribers, that would allow modules to say who the recipients of a given newsletter or mail are.

Mail

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: