Skip to content

Instantly share code, notes, and snippets.

@vosechu
Created August 7, 2013 17:39
Show Gist options
  • Save vosechu/6176479 to your computer and use it in GitHub Desktop.
Save vosechu/6176479 to your computer and use it in GitHub Desktop.
Quick email class for Rebecca and Hakimu
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