Reputation: 10025
I have moved from rails 3.0 to rails 2.3.4.So a newbie currently for this version.I want to set the SMTP settings for my rails 2.3.4 application but unable to find which file to create or use like as in rails 3.0.Mailchimp has been used as a 3rd party email provider to send bulk messages.
Upvotes: 0
Views: 1512
Reputation: 6857
Config for dev environment: config/environments/development.rb
Here is a typical configuration that sends mail via Google Account.
config.action_mailer.perform_deliveries = false # Set it to true to send the email in dev mode
config.action_mailer.raise_delivery_errors = true
config.action_mailer.delivery_method = :smtp
config.action_mailer.default_url_options = { :host => "localhost:3000" }
ActionMailer::Base.smtp_settings = {
:address => "smtp.gmail.com",
:port => 587,
:authentication => :plain,
:user_name => "[email protected]",
:password => "password"
}
Upvotes: 3
Reputation: 13972
Usually in Rails 2 you put those settings in config/environments/*.rb. Because your development settings will be different from production, etc etc.
So something like:
config.action_mailer.smtp_settings = {
:address => "localhost",
:port => 2525
}
in the configure block in config/environments/development.rb
Upvotes: 1