Skip to content

Instantly share code, notes, and snippets.

@gelias
Last active January 26, 2017 13:57
Show Gist options
  • Select an option

  • Save gelias/559387f6110013b0a28519f34e0a0ba5 to your computer and use it in GitHub Desktop.

Select an option

Save gelias/559387f6110013b0a28519f34e0a0ba5 to your computer and use it in GitHub Desktop.
require 'pony'
# GMAIL
Pony.options = {:via => :smtp, :to => 'fulano@domain.com', :via_options => { :address => 'smtp.gmail.com', :port => '587', :enable_starttls_auto => true, :user_name => 'ciclano@domain.com', :password => '******', :authentication => :plain, :domain => 'localhost.localdomain'} }
Pony.mail(:subject => 'subject' ,:body => 'body')
# AWS/SES
Pony.options = {:via => :smtp, :from => 'verified-email@domain.com', :to => 'fulano@domain.com', :via_options => { :address => 'AWS-ENDPOINT', :port => '587', :enable_starttls_auto => true, :user_name => '*****', :password => '******', :authentication => :plain, :domain => 'localhost.localdomain'} }
Pony.mail(:subject => 'subject' ,:body => 'body')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment