Created
February 29, 2012 13:29
-
-
Save dnshl/1940841 to your computer and use it in GitHub Desktop.
Ruby SMTP email template
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
#!/usr/bin/env ruby | |
require 'net/smtp' | |
from = "" | |
to = "" | |
smtp_server = "" | |
port = 25 | |
username = "" | |
password = "" | |
message = <<MESSAGE_END | |
From: from <> | |
To: to <> | |
Subject: | |
text | |
MESSAGE_END | |
Net::SMTP.start(smtp_server, port, "localhost", username, password, :login) do |smtp| | |
smtp.send_message message, from, to | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment