Hi, I have wasted few days and I''m not getting anywhere. I was trying to follow tutorial on Rails Guides and this one: http://www.tutorialspoint.com/ruby-on-rails/rails-send-email.htm . 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. Jack -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
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 -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Phillip Koebbe
2010-Mar-05 02:15 UTC
Re: has anybody made actionmailer work with rails 2.3.5?
On Mar 4, 6:16 pm, Bigos <ruby.obj...-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> 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. > > JackHi 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 test_user-hcDgGtZH8xNBDgjK7y7TUQ@public.gmane.org Date: Thu, 4 Mar 2010 20:05:33 -0600 From: another_user-hcDgGtZH8xNBDgjK7y7TUQ@public.gmane.org To: test_user-hcDgGtZH8xNBDgjK7y7TUQ@public.gmane.org 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
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. -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Phillip Koebbe
2010-Mar-05 19:07 UTC
Re: has anybody made actionmailer work with rails 2.3.5?
On Mar 5, 12:14 pm, Bigos <ruby.obj...-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:> 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 :) Peace, Phillip -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
shyam mohan
2010-Mar-07 09:04 UTC
Re: Re: has anybody made actionmailer work with rails 2.3.5?
see this http://www.youtube.com/watch?v=iJZ8w5o_TkE may be u get some idea Regards, Shyam +91-9716-18-9650 On Sat, Mar 6, 2010 at 12:37 AM, Phillip Koebbe <phillipkoebbe-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>wrote:> > > On Mar 5, 12:14 pm, Bigos <ruby.obj...-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote: > > 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 :) > > Peace, > Phillip > > -- > 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> > . > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.