[drupal-devel] [wanted] mail queue

Gerhard Killesreiter killesreiter at physik.uni-freiburg.de
Wed Aug 17 10:16:32 UTC 2005



On Wed, 17 Aug 2005, Dries Buytaert wrote:

> Anyone with a mail background that would like to investigate http://
> drupal.org/node/28604 ?

Maybe.

> The idea is to create a mail.inc for core that implements a mail
> queue, as well as provides common functionality such as converting
> HTML to text.
>
> It would be a centralized building block for modules like
> notify.module, project.module, subscription.module,
> simplenews.module, etc.

I've spent some time discussing mail and Drupal with Kieran and I have
also been working on the massmailer module. Here are my thoughts on what I
think we need:

1) Front ends. that would be any module that wishes for some reason to
send single or mass mail.

2) API. A module that takes mail from frontends and hands it off to
backends. It has APIs to get mail and to provide (to 1)) and collect
(from 3)) feedback on mails sent (think: bounces, failures).

3) backends. Anything that is capable of sending mail, either directly or
through the system's MTA. A backend can expose a certain set of features.
If the backend does not implement a certain feature, the API would need to
fall back on something else.

The current massmailer module is a merger of 1) and 2) while relying on
phplist as a backend (addressed through a phplist.module). In principle
more backends could have been written, but nobody did that. The backend is
also not complete (no bounce handling, although phplist can do that).

What should be in Drupal core?
- frontends: user.module, contact.module, simplenews?
- API
- user_mail as a backend. Maybe some ligthweight library.

This architecture has the benefit that it is very flexible and allows
everybody to swap in his pet mailer.

I have on purpose left out subjects of mail formatting as they are not
really a problem of mail sending. There could be an extra .inc file for
formatting, but I don't see this as a core issue.

BTW: The fact that massmailer was so buggy seems to indicate that the
demand for massmailing beyond user_mail()'s capabilities is maybe
overestimated. ;->

Cheers,
	Gerhard



More information about the drupal-devel mailing list