On Mar 4, 6:16 pm, Bigos <[email protected]> wrote: > I can do it PHP way using: > > require 'net/smtp' > Net::SMTP.start(..) do |smtp| > ... > > but I didn't give up trying to do it Rails way. I hope someone will > point me in right direction. > > Jack
Hi Jack, I don't have a tutorial link handy, but here is a very simple example that I just hacked together (very quickly). Maybe this will get you started! http://gist.github.com/322378 Start a new project, make those changes, fire up the server with script/server, navigate to http://localhost:3000/test/send_mail, then look in your development log. You should see something that resembles what is below. Peace, Phillip ==================================================== Processing TestController#send_mail (for 127.0.0.1 at 2010-03-04 20:05:33) [GET] Sent mail to [email protected] Date: Thu, 4 Mar 2010 20:05:33 -0600 From: [email protected] To: [email protected] Subject: Test Message Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Hi There. Completed in 6ms (View: 0, DB: 0) | 200 OK [http://localhost/test/ send_mail] -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

