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.
ryan (Guest)
on 2006-03-05 07: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!
Alain R. (Guest)
on 2006-03-05 12: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
William (Guest)
on 2006-03-05 17: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
Arch S. (Guest)
on 2007-04-07 02:33
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.
Dutch Rapley (Guest)
on 2007-04-07 08: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 
removed_email_address@domain.invalid
Arch S. (Guest)
on 2007-04-07 19: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 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"
This topic is locked and can not be replied to.