Forum: Ruby on Rails DreamHost and ActionMailer

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
1e2dd87a31c5d3e07adc9efa375f4dc4?d=identicon&s=25 ryan (Guest)
on 2006-03-05 06:29
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!
0091f92762685860109bbcb02edfdf27?d=identicon&s=25 Alain Ravet (Guest)
on 2006-03-05 11:47
(Received via mailing list)
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
15f87f2fef8b0ffedfa127b42895f5a1?d=identicon&s=25 William (Guest)
on 2006-03-05 16:19
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/DreamhostR...

Cheers,

~William
http://www.railshosting.org
A111108ed3617edc35da89e84689c3c2?d=identicon&s=25 Arch Stanton (d6veteran)
on 2007-04-07 00:33
Alain Ravet 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 user@domain.com?  I've tried
both but am curious if one is correct over the other.
Db31811eb76d98459bc9e6cb3f043f55?d=identicon&s=25 Dutch Rapley (Guest)
on 2007-04-07 06:02
(Received via mailing list)
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 user@domain.com
A111108ed3617edc35da89e84689c3c2?d=identicon&s=25 Arch Stanton (d6veteran)
on 2007-04-07 17:21
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 user@domain.com

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 => "user@domain.com"
     :user_name      => "amailusername"
     :password       => "amailpassword"
}
ActionMailer::Base.perform_deliveries = true
ActionMailer::Base.default_charset = "utf-8"
This topic is locked and can not be replied to.