# Action\_mailer settings for multiple sites

**URL:** <https://www.ruby-forum.com/t/action-mailer-settings-for-multiple-sites/138078>\
**Category:** Rails\
**Created:** [May 20, 2008, 1:12am UTC](https://www.ruby-forum.com/t/action-mailer-settings-for-multiple-sites/138078 "2008-05-20T01:12:28Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kevin\_Wu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/d78d45/32.png) [@Kevin\_Wu](https://www.ruby-forum.com/u/Kevin_Wu)\
**Post date:** [May 20, 2008, 1:12am UTC](https://www.ruby-forum.com/t/action-mailer-settings-for-multiple-sites/138078/1 "2008-05-20T01:12:28Z")

</div>

Hello people

I have an app that I deploy to multiple sites.  
In this app, I send out email notifications.

In my actionmailer I have  
ActionMailer::Base.smtp\_settings = {  
:address =\> ‘smtp.[domain]’,  
:port =\> 25,  
:domain =\> ‘smtp.[domain]’,  
:user\_name =\> ‘noreply@[domain]’,  
:password =\> ‘[password]’,  
:authentication =\> :plain

}

I know in the controller, I can do a request.domain(1) to get the  
[domain.com](http://domain.com), but I’m not in the controller. If my understanding is  
correct, this is ran once as the mongrels are starting up. How would  
I determine the domain name without the request object?

Thanks for your help.

Kevin
