# Sending Email from localhost and Dreamhost

**URL:** <https://www.ruby-forum.com/t/sending-email-from-localhost-and-dreamhost/106254>\
**Category:** Rails\
**Created:** [June 7, 2007, 9:31pm UTC](https://www.ruby-forum.com/t/sending-email-from-localhost-and-dreamhost/106254 "2007-06-07T21:31:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![noob](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/5e9695/32.png) [@noob](https://www.ruby-forum.com/u/noob)\
**Post date:** [June 7, 2007, 9:31pm UTC](https://www.ruby-forum.com/t/sending-email-from-localhost-and-dreamhost/106254/1 "2007-06-07T21:31:22Z")

</div>

Hi

I am currently developing on my local machine. I also have an account  
with Dreamhost.

However, I trying to send an email from my localhost, using my dreamhost  
smtp account. I followed  
[http://wiki.rubyonrails.org/rails/pages/HowToSendEmailsWithActionMailer](http://wiki.rubyonrails.org/rails/pages/HowToSendEmailsWithActionMailer)  
tutorial, but it’s not working.

Here are my files:

# environment.rb:

ActionMailer::Base.delivery\_method = :sendmail  
ActionMailer::Base.smtp\_settings = {  
:address =\> “[mail.website.com](http://mail.website.com)”,  
:port =\> 25,  
:domain =\> “[website.com](http://website.com)”, # i have also tried [mail.website.com](http://mail.website.com)  
:authentication =\> :login,  
:user\_name =\> “username”,  
:password =\> “password”  
}  
ActionMailer::Base.perform\_deliveries = true  
ActionMailer::Base.raise\_delivery\_errors = true

# WelcomeController.rb

def index  
Notifier.deliver\_signup\_thanks  
end

Can anyone help me out? Does it not work form localhost?

---

<div class="post-metadata">

**Author:** ![noob](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/5e9695/32.png) [@noob](https://www.ruby-forum.com/u/noob)\
**Post date:** [June 8, 2007, 2:48am UTC](https://www.ruby-forum.com/t/sending-email-from-localhost-and-dreamhost/106254/2 "2007-06-08T02:48:02Z")

</div>

I had some trouble with this as well, but this came in handy:

[http://wiki.dreamhost.com/ActionMailer](http://wiki.dreamhost.com/ActionMailer)

This is what mine looks like, but it is specific for sending emails  
from a subdomain:

# Include your application configuration below

ActionMailer::Base.server\_settings = {  
:address =\> “[mail.domain.com](http://mail.domain.com)”,  
:port =\> 25,  
:domain =\> ‘[subdomain.domain.com](http://subdomain.domain.com)’,  
:user\_name =\> “m1234567”,  
:password =\> “password”,  
:authentication =\> :login  
}

On 6/7/07, Noob [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> :user\_name =\> “username”,
> 
> Can anyone help me out? Does it not work form localhost?
> 
> –  
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).
> 
> >

–  
F. Morgan Whitney

> **[Home - Blizzo](http://www.blizzo.com)**
>
> Insight. Culture. Passion. OUR STORY About Our Clients We recognize that our clients are the key element in our success and that we play an important part in helping build their business and brand. Whether our client is a small service business or a...
