-- Drupal and Web Development

Notice: this post was last updated 6 years 27 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, 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:


  • 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.


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

tar -xvf mailhandler-6.x-1.8.tar.gz
cd mailhandler
patch -p0 < mailhandler_pop_deletion.patch

tar -xvf mailsave-6.x-1.3.tar.gz
cd mailsave
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.

Hi I followed the step given

Hi I followed the step given above but my content is not showing, can you help me?

Hi, the post is 2 1/2 years

Hi, the post is 2 1/2 years old, and relies on very specific versions of each component. Overall, the procedure is rather fragile and on the site on which I was using it, it also broke down. If anyone finds a way to fix it, please let me know!