require ‘net/smtp’
msg = <<END_OF_MESSAGE
From: from_alias <from_where>
To: to_alias <to_where>
Subject: Ruby Mail Test
As title. This is a test mail sending by ruby.
END_OF_MESSAGE
Net::SMTP.start() do |smtp|
smtp.sendmail( msg, “from_where", “to_where" )
end
That’s all.:D
Reference Link:
sendmail (Net::SMTP)