Drupal MailHandler - a learning curve

By John Bowen, 31 October, 2008

My first, second and third tries at posting to this Drupal site from a cell phone have taught me a lot about the MailHandler module. They've also left me with a few questions.

I've learned that you don't want 'Full HTML' set as the 'Input Format' for email-submitted items. It's probably best to come up with a custom input type, but for now I've settled on using 'Filtered HTML'. Also, make sure your phone/email application isn't sending HTML formatted messages. That will add an extra set of and tags in your post, which is in a page that already has those tags. It just screws up the pages' HTML, which could lead to unexpected results.

A larger lesson I've picked up is that you have to be careful with the 'default commands' you enter in the Mailhandler module's settings for your email account. In my case, I made the mistake of setting 'type: Story', thinking I wanted all my emailed posts to end up as stories (on this blog).

Unfortunately, Drupal recognizes 'story' as a content type, but 'Story' is only partially recognized. It would display (in view mode) OK, but trying to edit these 'Story' types would give me a blank screen (well actually, it had the site's title, color scheme, etc...just no body content for the post to be edited).

Changing the node type in the database from 'Story' to 'story' made all this better.

Now, to figure out how to keep images that were attached to the message...

Filtered HTML

  • Web page addresses and email addresses turn into links automatically.
  • Allowed HTML tags: <a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.