Sha256: 4ae62360d1ca11f0d49f99231e611bf32ddcf65c179a1966a8f1e59ec814342d

Contents?: true

Size: 991 Bytes

Versions: 41

Compression:

Stored size: 991 Bytes

Contents

module Platformx
  # Mail module
  # @author Tim Mushen
	module Mail

# Conig mail
def self.init
    #Pony Configs
     Pony.options = { 
      :from => Platformx.configuration.mail_from,
      :via => :smtp,
      :via_options => {
        :from => Platformx.configuration.mail_from,
        :address => Platformx.configuration.mail_address,
        :port => Platformx.configuration.mail_port,
        :domain => Platformx.configuration.mail_domain,
        :user_name => Platformx.configuration.mail_user_name,
        :enable_starttls_auto => true,
        :password => Platformx.configuration.mail_password,
        :authentication => :login
      }
    }
end

# Send mail
# @param to [String] to addresses
# @param cc [String] cc addresses
# @param html_body [String] body of the message (in html)
def self.mail(to: "", cc: "", subject: "", html_body: "")
    init
    Pony.mail(
      to: to, 
      cc: cc,
      subject: subject, 
      html_body: html_body
      )
end

    end
end

Version data entries

41 entries across 41 versions & 1 rubygems

Version Path
platformx-0.0.9.7.2 lib/platformx/mail.rb
platformx-0.0.9.7.1 lib/platformx/mail.rb
platformx-0.0.9.6.6.7 lib/platformx/mail.rb
platformx-0.0.9.6.6.6 lib/platformx/mail.rb
platformx-0.0.9.6.6.5 lib/platformx/mail.rb
platformx-0.0.9.6.6.4 lib/platformx/mail.rb
platformx-0.0.9.6.6.3 lib/platformx/mail.rb
platformx-0.0.9.6.6.2 lib/platformx/mail.rb
platformx-0.0.9.6.6.1 lib/platformx/mail.rb
platformx-0.0.9.6.4 lib/platformx/mail.rb
platformx-0.0.9.6.3 lib/platformx/mail.rb
platformx-0.0.9.6.2 lib/platformx/mail.rb
platformx-0.0.9.6.1 lib/platformx/mail.rb
platformx-0.0.9.6 lib/platformx/mail.rb
platformx-0.0.9.5 lib/platformx/mail.rb
platformx-0.0.9.4 lib/platformx/mail.rb
platformx-0.0.9.3 lib/platformx/mail.rb
platformx-0.0.9.2 lib/platformx/mail.rb
platformx-0.0.9 lib/platformx/mail.rb
platformx-0.0.8.9.9.9 lib/platformx/mail.rb