# How to Create Data in Rails App using Inbound Email includin

**URL:** <https://www.ruby-forum.com/t/how-to-create-data-in-rails-app-using-inbound-email-includin/102733>\
**Category:** Rails\
**Created:** [March 30, 2007, 5:36pm UTC](https://www.ruby-forum.com/t/how-to-create-data-in-rails-app-using-inbound-email-includin/102733 "2007-03-30T17:36:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![nathandelane](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/df705f/32.png) [@nathandelane](https://www.ruby-forum.com/u/nathandelane)\
**Post date:** [March 30, 2007, 5:36pm UTC](https://www.ruby-forum.com/t/how-to-create-data-in-rails-app-using-inbound-email-includin/102733/1 "2007-03-30T17:36:55Z")

</div>

I am trying to create a feature within my application to receive  
product data including an image attachment via inbound email.

Can someone point me to a tutorial or other document online that will  
help out with this. I have started hammering at Google, but was  
hoping someone could provide a link.

Thanks,  
Nathan

---

<div class="post-metadata">

**Author:** ![nathandelane](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/df705f/32.png) [@nathandelane](https://www.ruby-forum.com/u/nathandelane)\
**Post date:** [April 5, 2007, 5:18am UTC](https://www.ruby-forum.com/t/how-to-create-data-in-rails-app-using-inbound-email-includin/102733/2 "2007-04-05T05:18:46Z")

</div>

On Mar 30, 2007, at 8:35 AM, Nathan L. wrote:

> I am trying to create a feature within my application to receive  
> product data including an image attachment via inbound email.
> 
> Can someone point me to a tutorial or other document online that will  
> help out with this. I have started hammering at Google, but was  
> hoping someone could provide a link.

Nathan,

Basically, you can have your email server (say, Postfix) “deliver”  
the email message to a command like:  
/srv/www/rails/current/script/runner ImageMailer.receive(STDIN.read)

Looks like the TMail library that ActionMailer uses has an API for  
attachments, so you’ll want to look there, too.

I have a partially-relevant example for Mailman here:  
[http://butlerpress.com/2006/01/23/hello-world/](http://butlerpress.com/2006/01/23/hello-world/)

Note that since this fires up a new Rails process for every email,  
it’s not very scaleable.

Scott
