In order to use ActionMailer, you will need to first setup an email account in cPanel/LxAdmin, then plug in your new email account details below and place this in your environment.rb file.
For Rails 2.1+
config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
:address => "localhost",
:port => 25,
:domain => "example.com",
:user_name => "mail@example.com",
:password => "foobar",
:authentication => :login
}
For Rails 1.2+
ActionMailer::Base.delivery_method = :smtp
ActionMailer::Base.smtp_settings = {
:address => "localhost",
:port => 25,
:domain => "example.com",
:user_name => "mail@example.com",
:password => "foobar",
:authentication => :login
}
For Previous Rails Versions:
ActionMailer::Base.delivery_method = :smtp
ActionMailer::Base.server_settings = {
:address => "localhost",
:port => 25,
:domain => "example.com",
:user_name => "mail@example.com",
:password => "foobar",
:authentication => :login
}