Sha256: 2849b6f9418f09da454436593c291d9d23cb4c8bd7eba0ec95772ecd79d018d7
Contents?: true
Size: 504 Bytes
Versions: 1
Compression:
Stored size: 504 Bytes
Contents
require 'mail' module Messenger class Email # URL format: # mailto:email@example.com # # Options: # :email_from => Who the email is from # :email_subject => The subject of the email def self.send(url, message, options={}) mail = Mail.new do from options[:email_from] to url.sub(/mailto:/, '') subject options[:email_subject] body message end mail.deliver! [true, nil] end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
messenger-0.0.3 | lib/messenger/email.rb |