Created
May 30, 2017 13:38
-
-
Save skylerto/60f111ae6cd0280c304c98cabd1ec8a6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'mail' | |
args = ARGV | |
user = args[0] | |
pass = args[1] | |
options = { :address => "smtp.gmail.com", | |
:port => 587, | |
:user_name => user, | |
:password => pass, | |
:authentication => 'plain', | |
:enable_starttls_auto => true } | |
Mail.defaults do | |
delivery_method :smtp, options | |
end | |
to = | |
Mail.deliver do | |
to user | |
from user | |
subject 'This is a Test' | |
body 'This is a test to determine if mail can be sent' | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment