Method: Autobuild::MailReporter#initialize
- Defined in:
- lib/autobuild/mail_reporter.rb
#initialize(config) ⇒ MailReporter
Returns a new instance of MailReporter.
27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/autobuild/mail_reporter.rb', line 27 def initialize(config) super() @from_email = (config[:from] || default_mail) @to_email = (config[:to] || default_mail) @subject = config[:subject] || "Build %result% on #{Socket.gethostname} at %time%" @only_errors = config[:only_errors] @smtp_hostname = (config[:smtp] || "localhost") @smtp_port = Integer(config[:port] || Socket.getservbyname('smtp')) end |