0.0
No commit activity in last 3 years
No release in over 3 years
easily authenticate into your google apps account and send mail through google's free smtp
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.8.3
~> 3.12
 Project Readme

[![endorse](api.coderwall.com/ericraio/endorsecount.png)](http://coderwall.com/ericraio)

smtp_with_gmail¶ ↑

gem install smtp_with_gmail

SMTP¶ ↑

def send_message
  require "time"
  msgstr = <<END_OF_MESSAGE
  From: Your Name <you@gmail.com>
  To: Destination Address <yourfriend@gmail.com>
  Subject: test message
  Date: #{Time.now.rfc2822}

  test message body.
  END_OF_MESSAGE

  Net::SMTP.enable_tls(OpenSSL::SSL::VERIFY_NONE)
  Net::SMTP.start("smtp.gmail.com", "587", "your.domain", "username", "password", :plain) do |smtp|
    smtp.send_message msgstr, "you@gmail.com", "yourfriend@gmail.com"
  end
end

POP¶ ↑

def receive_messages
  Net::POP.enable_ssl(OpenSSL::SSL::VERIFY_NONE)
  Net::POP.start("pop.gmail.com", "995", "username", "password") do |pop|
    p pop.mails[0].pop
  end
end

Contributing to smtp_with_gmail¶ ↑

  • Check out the latest master to make sure the feature hasn’t been implemented or the bug hasn’t been fixed yet.

  • Check out the issue tracker to make sure someone already hasn’t requested it and/or contributed it.

  • Fork the project.

  • Start a feature/bugfix branch.

  • Commit and push until you are happy with your contribution.

  • Make sure to add tests for it. This is important so I don’t break it in a future version unintentionally.

  • Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.

Copyright © 2012 Eric Raio. See LICENSE.txt for further details.