DreamHost and ActionMailer


#1

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!


#2

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


#3

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


#4

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 removed_email_address@domain.invalid


#5

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 removed_email_address@domain.invalid? I’ve tried
both but am curious if one is correct over the other.


#6

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 removed_email_address@domain.invalid

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 => “removed_email_address@domain.invalid”
:user_name => “amailusername”
:password => “amailpassword”
}
ActionMailer::Base.perform_deliveries = true
ActionMailer::Base.default_charset = “utf-8”