require 'net/smtp'
message = <<MESSAGE_END
···
From: Private Person <me@fromdomain.com>
To: A Test User <chandan.k@cisinlabs.com>
MIME-Version: 1.0
Content-type: text/html
Subject: SMTP e-mail test
This is an e-mail message to be sent in HTML format
<b>This is HTML message.</b>
<h1>This is headline.</h1>
MESSAGE_END
Net::SMTP.start('localhost') do |smtp|
smtp.send_message message, 'me@fromdomain.com',
'chandan.k@cisinlabs.com'
end
--
Posted via http://www.ruby-forum.com/.