Skip to content

Instantly share code, notes, and snippets.

@blasterpal
Created November 17, 2010 15:36
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save blasterpal/703520 to your computer and use it in GitHub Desktop.
Save blasterpal/703520 to your computer and use it in GitHub Desktop.
Plain SMTP Email-Relay Test script
require 'net/smtp'
message = <<MESSAGE_END
From: Hank Beaver <hbeaver@maxmedia.com>
To: Hank Beaver <hbeaver@gmail.com>
Subject: SMTP e-mail test
This is a test e-mail message.
MESSAGE_END
Net::SMTP.start('mxm-mail.mxmsite.com') do |smtp|
smtp.send_message message, 'mail-server@mxmsite.com',
'hbeaver@gmail.com'
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment