def initialize( name, opts = {} )
opts[:header] = false
super(name, opts)
af = opts.getopt(:buffsize) ||
opts.getopt(:buffer_size) ||
100
configure_buffering({:auto_flushing => af}.merge(opts))
self.from = opts.getopt :from
raise ArgumentError, 'Must specify from address' if @from.nil?
self.to = opts.getopt :to
raise ArgumentError, 'Must specify recipients' if @to.empty?
self.subject = opts.getopt :subject, "Message from #{$0}"
self.address = opts.getopt(:server) || opts.getopt(:address) || 'localhost'
self.port = opts.getopt(:port, 25)
self.domain = opts.getopt(:domain, ENV['HOSTNAME']) || 'localhost.localdomain'
self.user_name = opts.getopt(:acct) || opts.getopt(:user_name)
self.password = opts.getopt(:passwd) || opts.getopt(:password)
self.enable_starttls_auto = opts.getopt(:enable_starttls_auto, false)
self.authentication = opts.getopt(:authtype) || opts.getopt(:authentication) || :plain
end