Forum: Ruby Problem with SMTP mail program

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
A00307e23f269e98a82641e1e3adcb2f?d=identicon&s=25 Dhiraj Girdhar (dgirdhar)
on 2007-07-09 11:13
Hi,

I took following very simple mail program from one of Ruby site, it is
working fine on my system, but not on other system. The only difference
which i Observed is that on other machine Microsoft Outlook is not
installed.

Please tell me the reason?


  msgstr = <<END_OF_MESSAGE
    From: Dhiraj Girdhar <dhiraj@samplemail.com>
    To: Dhiraj Girdhar <dhiraj@samplemail.com>
    Subject: test message
    Date: Sat, 14 Jun 2007 16:26:43 +0900
    Message-Id: <1dhiraj@samplemail.com>

    This is a test message.
END_OF_MESSAGE

    require 'net/smtp'
    Net::SMTP.start('samplemailexchangeserver.arcot.com', 25) do |smtp|
      smtp.send_message msgstr,
                        'dhiraj@samplemail.com',
                        'dhiraj@samplemail.com'
    end

Regards:
Dhiraj
Be07c8d0d6867fd9a0d525f7d17600e2?d=identicon&s=25 Damjan Rems (ther)
on 2007-07-09 11:25
How about some error description?

by
TheR
A00307e23f269e98a82641e1e3adcb2f?d=identicon&s=25 Dhiraj Girdhar (dgirdhar)
on 2007-07-09 12:27
Damjan Rems wrote:
>
> How about some error description?
>
> by
> TheR

I am getting following error message..

d:/ruby/lib/ruby/1.8/net/protocol.rb:206:in `initialize': getaddrinfo:
no address associated with hostname. (S
ocketError)
        from d:/ruby/lib/ruby/1.8/net/protocol.rb:206:in `new'
        from d:/ruby/lib/ruby/1.8/net/protocol.rb:206:in `old_open'
        from d:/ruby/lib/ruby/1.8/timeout.rb:56:in `timeout'
        from d:/ruby/lib/ruby/1.8/timeout.rb:76:in `timeout'
        from d:/ruby/lib/ruby/1.8/net/protocol.rb:206:in `old_open'
        from d:/ruby/lib/ruby/1.8/net/smtp.rb:393:in `do_start'
        from d:/ruby/lib/ruby/1.8/net/smtp.rb:378:in `start'
        from d:/ruby/lib/ruby/1.8/net/smtp.rb:316:in `start'
7b4707f974af261f71943e1f2046c9ee?d=identicon&s=25 SonOfLilit (Guest)
on 2007-07-09 13:31
(Received via mailing list)
Sounds like a DNS error.

Do you get DNS to that address? I don't.


Aur
This topic is locked and can not be replied to.