Has anybody made actionmailer work with rails 2.3.5?

Hi,

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 | Tutorialspoint .

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

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

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!

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]

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.

see this

may be u get some idea

Regards,
Shyam
+91-9716-18-9650

On Mar 5, 12:14 pm, Bigos [email protected] wrote:

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 :slight_smile:

Peace,
Phillip