DreamHost and ActionMailer

I’m getting ready to sign up with DreamHost, but my application is
missing the ActionMailer features.

First, can anyone provide some real code to send an email upon comment
submission?

Second, is it easy to setup ActionMailer on a DreamHost server?

Thanks!

ryan

> Second, is it easy to setup ActionMailer on a DreamHost server?

Yes it is :
1/create a mail user
amailusername/amailpassword

2/In environment.rb, add code like this:

ActionMailer::Base.delivery_method = :smtp
ActionMailer::Base.server_settings = {
:address => “mail.myfoorailsapp.mydomain.net” ,
:port => 587 ,
:domain => “myfoorailsapp.mydomain.net” ,
:authentication => :login ,
:user_name => “amailusername” ,
:password => “amailpassword” ,
}
ActionMailer::Base.perform_deliveries = true
ActionMailer::Base.default_charset = “utf-8”

Alain

And don’t forget that the Rails community has generously provided
DreamHost promo codes to get the maximum amount off

http://wiki.rubyonrails.org/rails/pages/DreamhostRailsPromoCodes

Cheers,

~William
http://www.railshosting.org

port 587 is for secure smtp, and I don’t know if dreamhost supports
this,
try changing port to 25, also the user should be [email protected]

Alain R. wrote:

ryan

> Second, is it easy to setup ActionMailer on a DreamHost server?

Yes it is :
1/create a mail user
amailusername/amailpassword

2/In environment.rb, add code like this:

ActionMailer::Base.delivery_method = :smtp
ActionMailer::Base.server_settings = {
:address => “mail.myfoorailsapp.mydomain.net” ,
:port => 587 ,
:domain => “myfoorailsapp.mydomain.net” ,
:authentication => :login ,
:user_name => “amailusername” ,
:password => “amailpassword” ,
}
ActionMailer::Base.perform_deliveries = true
ActionMailer::Base.default_charset = “utf-8”

Alain

I cannot get this to work. No errors either, I just never get any mail
received in my tests.

For the login, should I use mXXXXX or the [email protected]? I’ve tried
both but am curious if one is correct over the other.

Dutch Rapley wrote:

port 587 is for secure smtp, and I don’t know if dreamhost supports
this,
try changing port to 25, also the user should be [email protected]

Thanks.

I finally got this combination working:

ActionMailer::Base.delivery_method = :smtp
ActionMailer::Base.server_settings = {
:address => “mail.myfoorailsapp.mydomain.net
:port => 587
:domain => “myfoorailsapp.mydomain.net
:authentication => “[email protected]
:user_name => “amailusername”
:password => “amailpassword”
}
ActionMailer::Base.perform_deliveries = true
ActionMailer::Base.default_charset = “utf-8”