Mailhandler: content via mail

Last modified: November 20, 2008 - 22:11

The mailhandler module allows registered users to create or edit nodes and comments via e-mail. Users may post taxonomy terms, teasers, and other post attributes using the mail commands capability. This module is useful because e-mail is the preferred method of communication by community members.

The mailhandler module requires the use of a custom mailbox. Administrators can add mailboxes that should be customized to meet the needs of a mailing list. This mailbox will then be checked on every cron job. Administrators may also initiate a manual retrieval of messages.

This is particularly useful when you want multiple sets of default commands. For example , if you want to authenticate based on a non-standard mail header like Sender: which is useful for accepting submissions from a listserv. Authentication is usually based on the From: e-mail address. Administrators can edit the individual mailboxes when they administer mailhandler.

You can

  • run the cron job at cron.php.
  • add a mailbox at administer >> mailhandler >> add a mailbox.
  • administer mailhandler at administer >> mailhandler.
  • set default commands, (password, type, taxonomy, promote, status), for how to work with incoming mail at admin >> mailhandler select edit for the email address being handled. Set commands in the default command field.
  • post email, such as from a mailing list, to a forum by adding the term id (number found in the URL) to the default commands using tid: #.
  • file issues, read about known bugs, and download the latest version on the Mailhandler project page.

Mailhandler and Listservs

ghferrari - October 27, 2008 - 21:46

Hi there, I'm trying to use Mailhandler as follows. There is a mailing list (not connected in any way with my website) that sends out summary emails once a day. I'd like to be able to have those emails published automatically on my site (it's a public mailing list, so let's assume there are no legal/ethical reasons for me not to publish the emails on my site!). My question is, is it possible to achieve this with mailhandler, and if so, how?

In particular, my question concerns how to recognise emails sent from the listserv address (something like listserv@thirdparty.com) when that is not the email address of any user on my site. I think my question has something to do with the From header, but as I don't perfectly understand Mailhandler, I can't guess any more accurately than that. With thanks for your help.

GHF

no post to forum

MaxSenges - December 5, 2008 - 14:21

Hi everybody - I am stuck trying to integrate our mailing list with forum. I successfully setup listhandler so forum post is emailed to list, but no success getting mailhandler/listhandler to post to forum.

I am running drupal 6.02 and use a gmail account which is subscribed to and receives postings from the the mailman list

i only run two comands:

tid: 18
status: 1

Suspect I don't have the right tid # or am fouling up command for tid and/or type. group url looks like http://www.domainname.org/forum/1 and node/18, so tried tid: 1 and 18 to group commands, no luck.

Any insights greatly appreciated!

Max

a friends answer

MaxSenges - December 8, 2008 - 11:25

here is what a friend of mine answered:

In order to get this working, you'll need to verify:

1. The emails are indeed coming into the gmail account (I am sure they are)
2. Mailhandler is *retrieving* the emails! (under content management > mailhandler there is a retrieve link that you can click on to speed up testing this. If a message is retrieved, mail handler will report it right on that page. If it is not retrieving it, what is happening?
3. If mail handler *is* retrieving, what is it *doing* with the email? Look at the log in drupal it will show you what mailhandler did with the email

This is actually the most important part: Mailhandler was designed to work with commands that a user types into an email that is sent to the Drupal site. The commands are ridiculous for most users, because they are the numerical ID of the node, the taxonomy term, etc

So, if an email comes in, and it does not have any commands at the very top, then Mailhandler will fall back on your default commands.

So far, you default commads are:

tid: 18
status: 1

So, Mailhandler will publish the email as a *node*

..and, mail handler will add tid: 18, a taxonomy term

So, if you check under tid 18: yourdomain.com/taxonomy/term/18

Do you see the posts there?

If you check at yoursite.com/admin/content/node you should also see the posts there as status = published , if mailhandler is really retrieving them from gmail

Also, this is important:

The only way to do this without asking users to type commands in their emails is to have your default commands also declare type: forum as described here http://drupal.org/node/38943

This is also important: using default commands type: forum and tid: [your forum] will result in each email being posted as a new forum topic node. The only way that you can *thread* replies inside of a topic is to have incoming emails include commands nid and cid, and there is no existing way to do this in the code that is in mailhandler.

So, even if you get it working right *every single email will be a new foumr topic* and that is the best that you can currently do.

Hope that helps!

 
 

Drupal is a registered trademark of Dries Buytaert.