send mail via GMail with Pony


/ Published in: Ruby
Save to your folder(s)



Copy this code and paste it in your HTML
  1. Pony.mail(:to => '[email protected]', :via => :smtp, :via_options => {
  2. :address => 'smtp.gmail.com',
  3. :port => '587',
  4. :enable_starttls_auto => true,
  5. :user_name => 'id_gmail',
  6. :password => 'parola_gmail',
  7. :authentication => :plain, # :plain, :login, :cram_md5, no auth by default
  8. :domain => "HELO", # don't know exactly what should be here
  9. },
  10. :subject => 'hi', :body => 'Hello there.')

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.