To Use or not to use global variable

Hi
   My application has facility that any user can create a ticket from
the intranet site.So upon creating a ticket he gives an email id .And I
have to send mail back to this mail id giving created ticket's
information..My application is running on differnt ports (say 3000 and
3001 or example) Both for two companies..So as part of ticket creation
email to be send to user@company1.com(if it created from company 1
intranet), and similarly user2@company2.comif it created from company 2
intranet..here user1@company1.com and user2@ompany2.com are text boxes
eneterd by the user
     So where will I store the portion after @ (company1,company2) .Is
it inside a global variable by reading it from a yml file?This I am
doing to change code for second company..I think you understand the
problem

      And also one thing Suppose if I store it in a yml file can I call
this only once when I enter in to the controller ..As far I undestod
before_filer is called = no of times specified action is called

Thanks in advance
Sijo

Start here.

http://agilewebdevelopment.com/plugins/application_config

‘application_config’ eases project configuring by introducing yaml config file in RAILS_ROOT/config folder and provides handful methods accessing config values based on current rails environment. So, you can have separate sets of configuration properties for each rails environment you use.