"Dave Thomas" <Dave / PragmaticProgrammer.com> wrote in message
news:m2y9hb4lnm.fsf / zip.local.thomases.com...
> "Sean O'Dell" <sean / celsoft.com> writes:
>
> > smtp = Net::SMTP.new
> > smtp.start("celsoft.com")
>
> Are you running a SMTP server on localhost? If not, you'll see that
> error. The name you pass to 'start' is the HELO domain, not the
> address of the server. You can specify the server as the parameter to
::new.
>
> Also, the SMTP interface is changing, and the zero-argument
> constructor no longer works. In general, it's probably better to use
> the SMTP::start method to do the whole thing:
>
>
>     Net::SMTP.start( 'your.smtp.server', 25 ) {|smtp|
>         smtp.sendmail <<EndOfMail, 'your / mail.address', 'to / some.domain'
>     From: Your Name <your / mail.address>
>     To: Dest Address <to / some.domain>
>     Subject: test mail
>     Date: Sat, 23 Jun 2001 16:26:43 +0900
>     Message-Id: <unique.message.id.string / some.domain>
>
>     This is test mail.
>     EndOfMail
>     }

I tried it this way, but I kept getting the error that EndOfMail couldn't be
found, so I went with something similar out of your book.  That gave me no
syntax headache, but I still get connection refused.

    Sean