Sha256: 5eb1106e9c087bbfc44e1c693bdb3eaef909308c966cf25dd3ec5f095327d53a

Contents?: true

Size: 478 Bytes

Versions: 1

Compression:

Stored size: 478 Bytes

Contents

require 'pony'

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={})
      Pony.mail(
        :to => url.sub(/mailto:/, ''),
        :from => options[:email_from],
        :subject => options[:email_subject],
        :body => message
      )
      [true, nil]
    end

  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
messenger-0.0.2 lib/messenger/email.rb