Created
April 24, 2018 10:22
-
-
Save jasper-lyons/9dc2666c471b168ae048f7d9d19f427e to your computer and use it in GitHub Desktop.
Send email, in ruby with mail gem through microsoft email accounts!
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' | |
Mail.defaults do | |
delivery_method :smtp, { | |
address: 'smtp.live.com', | |
port: 587, | |
user_name: '<your email>', | |
password: '<your password>', | |
authentication: :login, | |
enable_starttls_auto: true | |
} | |
end | |
Mail.deliver do | |
from '...' | |
to '...' | |
subject '...' | |
body '...' | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment