Created
August 7, 2013 17:39
-
-
Save vosechu/6176479 to your computer and use it in GitHub Desktop.
Quick email class for Rebecca and Hakimu
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Email | |
def initialize | |
Pony.options = { :from => '[email protected]', :via => :smtp, :via_options => { :host => 'smtp.yourserver.com' } } | |
end | |
def self.email_admins | |
opts = { | |
:to => ['[email protected]', '[email protected]'], | |
:from => '[email protected]', | |
:subject => 'hi', | |
:body => 'Hello there.'} | |
Pony.mail(opts) | |
end | |
def self.email_customer(order) | |
opts = { | |
:to => order.user_email, | |
:from => '[email protected]', | |
:subject => 'hi', | |
:body => 'Hello there.'} | |
Pony.mail(opts) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment