usmanali
usmanali

Reputation: 2037

sending mail in rails 2.3.8

I am using rails 2.3.8. I am trying to send mail through action mailer. When i call the mailer function it does not throw any error and completes successfully even the log shows that the mail is sent. But when i check the mail box there is not mail sent actually Is there any problem with sendmail configuration or something else. Please help me out with it.

Thanks

Here are my setting in development.rb

config.action_mailer.raise_delivery_errors = false
ActionMailer::Base.delivery_method = :sendmail
ActionMailer::Base.sendmail_settings = {
  :location => "path/to/sendmail",
  :arguments => "-i"
}

Upvotes: 1

Views: 1579

Answers (2)

andrea
andrea

Reputation: 3505

if

config.action_mailer.perform_deliveries = true

dont work maybe a sendmail misconfiguration , try to send a mail from bash and check the output

touch file.log;
cat - file.log << EOF | sendmail -t
to:[email protected]
from:[email protected]
subject:Testing 123
TEST
EOF

otherwise I find useful to use this program (a fake smtp server) to test outgoing mail http://www.aboutmyip.com/AboutMyXApp/DevNullSmtp.jsp

Upvotes: 2

Andrei S
Andrei S

Reputation: 6516

add this to your development.rb file

config.action_mailer.perform_deliveries = true

because i don't see it in your configuration

Upvotes: 0

Related Questions