mediatribe.net -- Drupal and Web Development

Notice: this post was last updated 1 year 3 weeks ago so it might be outdated. Please be cautious before implementing any of suggestions herein.

Adding content (text and images) to a Drupal site via email

In my experience, there are several users who don't feel comfortable using the standard Drupal interface to create content on their website. I've noticed that this is the case with reforestation.net, I site I manage: even though I provide users with accounts and training, almost all users end up sending me their content (including images and text) via email, and I have to upload it myself to the Drupal site. The main reasons cited for not posting content to Drupal are: it's too complicated, connection too slow (especially in Africa and the Caribbean); and it does not work as expected. So much for end-user empowerment!

The one technology with which all users feel comfortable with is email, so I set about figuring out a way to get users to be able to post content to the site by sending an email (or rather, for now, sending it to me and me forwarding it to a special email account created on the site)

Here's a small (about 15 min.) video showing how to go about this. Be warned, though: at the time of this writing you have to apply two patches to actually make this work. Hopefully, future versions of the modules we use will be updated

Some references:

Troubleshooting:

  • There's an issue which only occurs on certain servers where you'll get a warning: imap_open() [function.imap-open]: Couldn't open stream error. The solution is to put "/novalidate-cert/tls" in the extra commands section of your mailbox.
  • If a user other than user/1 will be using this system, make sure that user has a role with the "convert to imagefield" permission set.
  • In my experience, if you get "warning: imap_header() [function.imap-header]: Bad message number", it is because there is no body in the message. This means you need some text before the first separating line ("-----") for your message to go through.

You will also need cck, imagecache, imagefield, imageapi, filefield

Adding content to a Drupal site via email from Albert Albala on Vimeo.

thanks!

Excellent. thank you. Here are the terminal commands that I issued:

wget http://ftp.drupal.org/files/projects/mailhandler-6.x-1.8.tar.gz
tar -xvf mailhandler-6.x-1.8.tar.gz
cd mailhandler
wget http://drupal.org/files/issues/mailhandler_pop_deletion.patch
patch -p0 < mailhandler_pop_deletion.patch

wget http://ftp.drupal.org/files/projects/mailsave-6.x-1.3.tar.gz
tar -xvf mailsave-6.x-1.3.tar.gz
cd mailsave
wget http://drupal.org/files/issues/mailsave-315381-32-work-with-mailhandler-...
patch -p0 < mailsave-315381-32-work-with-mailhandler-6.x-1.8.diff

Thank you. I run several

Thank you. I run several community sites, this will be very helpful.

Post new comment

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <h3>
  • Lines and paragraphs break automatically.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.

More information about formatting options

Image CAPTCHA
Enter the characters shown in the image.