lib/glue/mailer.rb in glue-0.25.0 vs lib/glue/mailer.rb in glue-0.26.0
- old
+ new
@@ -1,10 +1,12 @@
require 'glue/mail'
require 'glue/mailer/incoming'
require 'glue/mailer/outgoing'
require 'glue/configuration'
+require 'socket'
+
module Glue
# Handles incoming and outgoing emails. Can be called from
# a Controller or a standalone script (target of the MTA).
@@ -15,10 +17,10 @@
# The outgoing mail server configuration.
setting :server, :default => {
:address => 'localhost',
:port => 25,
- :domain => 'localhost.localdomain',
+ :domain => Socket.gethostname,
:username => nil,
:password => nil,
:authentication => nil
}, :doc => 'The outgoing server configuration'