Sha256: 8f1049eb719db0dbfa0d5988dddef35b05b78da80450d97785cec7c28f53268b
Contents?: true
Size: 628 Bytes
Versions: 6
Compression:
Stored size: 628 Bytes
Contents
require 'net/smtp' module MList module EmailServer class Smtp < Base def deliver(tmail) destinations = tmail.destinations tmail.delete_no_send_fields Net::SMTP.start(settings[:address], settings[:port], settings[:domain], settings[:user_name], settings[:password], settings[:authentication]) do |smtp| smtp.sendmail(tmail.encoded, tmail['sender'], destinations) end end def execute raise "Mail cannot be received through an SMTP server. Please use the '#{MList::EmailServer::Default.name}' type." end end end end
Version data entries
6 entries across 6 versions & 1 rubygems