diff options
author | Christoph Helma <helma@in-silico.ch> | 2010-05-21 15:55:17 +0200 |
---|---|---|
committer | Christoph Helma <helma@in-silico.ch> | 2010-05-21 15:55:17 +0200 |
commit | d5eea102ff343804dde1ccd254bc570596341a89 (patch) | |
tree | f62d8c2999341d99746ae644c795d1e9b2d3c7f7 /lib/config | |
parent | 147a45ce7336959777639d15a4c37fbe24375d97 (diff) |
dynamic From: address from mailer
Diffstat (limited to 'lib/config')
-rw-r--r-- | lib/config/config_ru.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/config/config_ru.rb b/lib/config/config_ru.rb index 8de82cb..34dfdf1 100644 --- a/lib/config/config_ru.rb +++ b/lib/config/config_ru.rb @@ -41,10 +41,11 @@ if MAIL end + require "socket" use Rack::MailExceptions do |mail| - mail.to 'helma@in-silico.ch' + mail.to MAIL[:user_name] mail.subject '[ERROR] %s' - mail.from "toxcreate@in-silico.ch" + mail.from "#{Socket.gethostname}@#{MAIL[:domain]}" mail.smtp MAIL end end |