Skip to content

Instantly share code, notes, and snippets.

@vosechu
Created August 7, 2013 17:39
Show Gist options
  • Select an option

  • Save vosechu/6176479 to your computer and use it in GitHub Desktop.

Select an option

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 => 'noreply@example.com', :via => :smtp, :via_options => { :host => 'smtp.yourserver.com' } }
end
def self.email_admins
opts = {
:to => ['connie@iconartistry.com', 'erica@hatsnpants.com'],
:from => 'me@example.com',
:subject => 'hi',
:body => 'Hello there.'}
Pony.mail(opts)
end
def self.email_customer(order)
opts = {
:to => order.user_email,
:from => 'me@example.com',
: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