Tumblr allows users to upload files using a randomly generated email account that is assigned specifically to each user. I have a content type called "Video" and I would like to find a way to randomly generate an email address using my site's domain and allow the user to attach a video file and meta data. When they send it, it gets uploaded to the site just like it would if they submitted the form online. I am also using Amazon SES if that could be helpful to solving this.

1 Answer 1


You have two options. The less efficient (but easier) way is to keep it in Drupal

The more efficient (and more difficult) way is to do a bit of this outside Drupal and hack at your MTA and/or use something like Amavis to do it.

Since you're on a Drupal site, I'll give you a quick rundown of how I might do this if I had to keep it in Drupal.

What you need to do is have the random generated email checked by Drupal regularly.

Create a module that periodically (via cron) logs in to each user's associated email address (these should be IMAP accounts!). If it finds a message that has the right subject line to trigger a new content post, then download the attachment and save it to the file system.

Keep in mind, this could be a crazy thing to do if you're dealing with a lot of users. The better option would be to have the emails processed outside of Drupal, and then use something else to trigger the Drupal content creation.

No matter which way you go, you're looking at quite a bit of programming. I have never seen a module that does this.

  • Interesting. Thanks for the ideas. I'll probably put this one on the back burner for now as a nice to have.
    – Adam
    Commented Feb 7, 2013 at 2:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.