require 'net/smtp'
message = < From: Private Person
To: Author of Beginning Ruby
Subject: SMTP e-mail test
This is a test e-mail message.
MESSAGE_END
Net::SMTP.start('mail.your-domain.com') do |smtp|
smtp.send_message message, 'me@your.net', 'test@r.com'
end