require 'glue/mail' require 'glue/mailer/incoming' require 'glue/mailer/outgoing' require 'glue/configuration' module Glue # Handles incoming and outgoing emails. Can be called from # a Controller or a standalone script (target of the MTA). class Mailer < Mail include IncomingMailer include OutgoingMailer # The outgoing mail server configuration. setting :server, :default => { :address => 'localhost', :port => 25, :domain => 'localhost.localdomain', :username => nil, :password => nil, :authentication => nil }, :doc => 'The outgoing server configuration' # The delivery method. The following options are # supported: # # * :smtp # * :sendmail # * :test setting :delivery_method, :default => :smtp, :doc => 'The delivery method' # Disable deliveries, useful for testing. setting :disable_deliveries, :default => false, :doc => 'Dissable deliveries?' # The default template root. setting :template_root, :default => 'template/mail', :doc => 'The default template root' # An array to store the delivered mails, useful # for testing. cattr_accessor :deliveries; @@deliveries = [] end end # * George Moschovitis