I have wasted few days and I'm not getting anywhere. I was trying to
follow tutorial on Rails Guides and this one:
Ruby on Rails - Send Emails .
All I need is to be able to send some text, nothing fancy. Why in
Rails it has to be so difficult? Why it can't be so simple as in PHP?
Can anybody point me to some good simple tutorial, explaining how to
do it from the beginning to the end?
I don't want some tutorial that tries to explain lots of complicated
stuff, skipping things needed by beginners.
Thank you very much in advance.
I can do it PHP way using:
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.
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
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.
I have managed to make it work. After changing config/environments/
development.rb to look like:
config.action_mailer.raise_delivery_errors = true
config.action_mailer.perform_deliveries = true
config.action_mailer.delivery_method = :sendmail ####
Now everything works fine on my system. Adding config line marked with
'####' to make rails use :sendmail and restarting mongrel made
everything work perfectly.
Yah. I left that one for you to find yourself. Good job!
Glad it's working for you now. I hope your experience with Rails is
less frustrating from now on. When I first came to Rails about 3 years
ago, it took me a couple of months to get my head wrapped around both
Ruby and Rails. But once I did, I really felt at home and became a
much happier programmer
may be u get some idea