Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement