Send email from form input


OK, I am a Rails nuby, so please keep that in mind. I want to have a
form on a page where users can enter in their email address in one
field, a message in a text area field, and when they click “submit” the
message should be sent to a static email address, say removed_email_address@domain.invalid. I
have read the “HowToSendEmailsWithActionMailer”, but I am not sure this
is exactly what I need. I think what I want should be fairly simple, I
just need a little guidance. Can some one give me a quick how to, or
point me to one to accomplish this task?

Thanks in advance.


ActionMailer is a pretty easy way to do it once you get the hang of it.
However, you might consider simply executing the shell mail command and
your text into it.

Places to look are:

“Programming Ruby,” (the Pickaxe), by Dave T., et. al.
“Agile Web D. with Ruby on Rails,” by Dave T., et. al.

These are great nuby resources.

“Rails Recipes,” by Chad F. is another great resource, but not quite
nuby oriented. The recipes that come to mind are “Validating non-Active
Record Objects (recipe 64),” and “Send Gracefully Degrading
Rich-Content Emails (recipe 67).”

View this message in context:
Sent from the RubyOnRails Users forum at