sending mail in rails from tutorial - outdated?

Posted by Stacia on Stack Overflow See other posts from Stack Overflow or by Stacia
Published on 2010-03-11T03:12:07Z Indexed on 2010/03/11 4:55 UTC
Read the original article Hit count: 304

Filed under:
|
|

I'm trying to use this tutorial (http://www.tutorialspoint.com/ruby-on-rails-2.1/rails-send-emails.htm) to send mail on rails, but nothing seems to happen. I have ActionMailer::Base.delivery_method = :sendmail in my environment.rb. It's possible the tutorial may be out of date for the more recent version of rails? If so can someone tell me where it goes wrong or a link to another tutorial. I see this in the log. It's a little supsicious that the "to" has subject and stuff appended to it, but I don't know where it went wrong.

Processing EmailerController#sendmail (for 127.0.0.1 at 2010-03-10 19:02:21) [POST]

  Parameters: {"commit"=>"Send", "authenticity_token"=>"251d315cc4dfc6c58c2c7f6f633d52b101d10c14", "email"=>{"recipient"=>"[email protected]", "subject"=>"booooooo", "message"=>"aabdsaf"}}
  SQL (0.1ms)   SET NAMES 'utf8'
  SQL (0.1ms)   SET SQL_AUTO_IS_NULL=0
Sent mail to subject, booooooo, recipient, [email protected], message, aabdsaf

Date: Wed, 10 Mar 2010 19:02:21 -0800
From: [email protected]
To: [email protected]
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8

Hi!

You are having one email message from [email protected] with a title 

This is title
and following is the message:


Thanks

edit: I manually changed "recipient" to my mail address and I still don't get mail, even though the problem in the log with all of the things stuck together is fixed.

© Stack Overflow or respective owner

Related posts about ruby-on-rails

Related posts about sendmail