Forum: Ruby on Rails Receiving email via Rails app?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
unknown (Guest)
on 2007-03-30 05:34
(Received via mailing list)
I need to be able to read email from an account on my Dreamhost server
using a Rails app.  I want to accept data and images via email if
possible.

Can anyone point me to a tutorial or other resource that would help me
accomplish this?

Thanks,
Nathan
jko170 (Guest)
on 2007-03-30 06:29
(Received via mailing list)
Rails Cookbook.
Jason E. (Guest)
on 2007-03-31 21:56
(Received via mailing list)
removed_email_address@domain.invalid wrote:
> I need to be able to read email from an account on my Dreamhost server using a Rails 
app.  I want to accept data and images via email if possible.
>
> Can anyone point me to a tutorial or other resource that would help me accomplish this?
>
See
http://api.rubyonrails.org/classes/ActionMailer/Base.html

You'll need to create a controller subclass of actionmailer and define a
receive method which handles the incoming email. Also consult the ruby
documentatino on the Tmail class.

You'll need to set up an automated way to feed the email to the
actionmailer controller. Procmail works well for that if Dreamhost
provides it. run "man procmail" on dreamhost  to see the documentation
on procmail.


The book  _Agile Web D. with Rails_ has a chapter on processing
email in rails.

Sincerely,
Jason
This topic is locked and can not be replied to.