1require 'net/smtp'
2
3sndr = 'ruby-test-script@localhost'
4rcpt = 'tcllib-test@localhost'
5msg = 'From: Ruby <ruby-test-script@localhost>
6To: SMTPD <tcllib-test@localhost>
7Subject: Testing from Ruby
8
9This is a sample message send from Ruby.
10As always, let us check the transparency function:
11. <-- there should be a dot there.
12Bye'
13
14Net::SMTP.start('localhost', 25) do |smtp|
15  smtp.send_mail msg, sndr, rcpt
16end
17