Class: ActionMailer::ARSendmail

Inherits:
Object
  • Object
show all
Defined in:
lib/ar_mailer_service/ar_sendmail.rb

Overview

The ARMailer class which does all the work defined in the ar_mailer gem.

Class Method Summary collapse

Class Method Details

.setup(args = ARGV) ⇒ Object

This class method is required to allow the command args to be processed and return an instance of ARSendmail. The :Once option is set so that control is returned to the containing object after processing the mail, in this case the daemon object. Otherwise it is not possible to stop the service once started, as ar_sendmail is designed to run standalone and exit on the TERM or INT signal which the windows service controller does not send.



16
17
18
19
20
# File 'lib/ar_mailer_service/ar_sendmail.rb', line 16

def self.setup(args = ARGV)
  options = process_args(args)
  options[:Once] = true
  new(options)      
end