Sha256: 8b159576db2fd8bf5e83cb4a6d97abde5b16762a7cd578168a9780c274dd4069
Contents?: true
Size: 564 Bytes
Versions: 2
Compression:
Stored size: 564 Bytes
Contents
require 'net/smtp' module MList module EmailServer class Smtp < Base def deliver(tmail, destinations) 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
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
aiwilliams-mlist-0.1.1 | lib/mlist/email_server/smtp.rb |
aiwilliams-mlist-0.1.2 | lib/mlist/email_server/smtp.rb |