Discussion: net/smtp question
Afficher un message
Vieux 17/09/2007, 06h48   #6
Damjan Rems
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: net/smtp question

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/.

  Réponse avec citation
 
Page generated in 0,05282 seconds with 9 queries