Michael Linfield wrote:
> Ive tried several examples from numerous books trying to send mail with
> net smtp and i never really get the emails.
>
> require 'net/smtp'
>
> message = <<MESSAGE_END
> From: Nobody <nobody@power.net>
> To: Someone <someone@hotmail.com>
> Subject: Test SMTP
>
> i pray that itll work
> MESSAGE_END
>
> Net::SMTP.start('mx1.hotmail.com') do |smtp|
> smtp.send_message message, 'nobody@power.net', 'someone@hotmail.com'
> end
This example works perfectly good for me.
I would chack if server 'mx1.hotmail.com' allows message relaying.
by
TheR
--
Posted via
http://www.ruby-forum.com/.