Email errors

I’m working on this recipie from the Ruby Cookbook, but receiving
errors. Not sure if this is code related or system related. I’m
attempting to send mail via my ISP’s smtp server.
To protect the innocent I took out the real names of domains , etc.

Errors:

:/instantrails/ruby/lib/ruby/1.8/net/protocol.rb:206:in initialize': getaddrinfo: no address associated with hostname. (SocketError) from C:/instantrails/ruby/lib/ruby/1.8/net/protocol.rb:206:in old_open’
from C:/instantrails/ruby/lib/ruby/1.8/timeout.rb:56:in timeout' from C:/instantrails/ruby/lib/ruby/1.8/timeout.rb:76:in timeout’
from C:/instantrails/ruby/lib/ruby/1.8/net/protocol.rb:206:in old_open' from C:/instantrails/ruby/lib/ruby/1.8/net/smtp.rb:393:in do_start’
from C:/instantrails/ruby/lib/ruby/1.8/net/smtp.rb:378:in start' from C:/instantrails/ruby/lib/ruby/1.8/net/smtp.rb:316:in start’
from
C:/instantrails/ruby/lib/ruby/gems/1.8/gems/actionmailer-1.2.3/lib/action_mailer/base.rb:447:in
perform_delivery_smtp' from C:/instantrails/ruby/lib/ruby/gems/1.8/gems/actionmailer-1.2.3/lib/action_mailer/base.rb:333:in deliver!’ from
C:/instantrails/ruby/lib/ruby/gems/1.8/gems/actionmailer-1.2.3/lib/action_mailer/base.rb:227:in
`method_missing’ from C:/InstantRails/ruby_progs/simplemailer.rb:24

Program:

#!/usr/bin/env ruby

require ‘rubygems’
require ‘action_mailer’

class SimpleMailer < ActionMailer::Base
def simple_message(recipient)
from ‘[email protected]
recipients recipient
subject ‘A single-part message for you’
body ‘This message has a plain text body’
end
end

ActionMailer::Base.server_settings = { :address => ‘smtp.mydomain.com’,
:port => 25,
:domain => ‘mydomain.com’,
:user_name =>
[email protected]’,
:password => ‘password’,
:authentiation => :login }

puts SimpleMailer.deliver_simple_message(‘[email protected]’)

I think I had an error in the address , now that’s it’s corrected I
get a new error:

`check_response’: 504 CRAM-MD5 authentication mechanism not supported
(Net::SMTPSyntaxError)

“D” == Dark A. [email protected] writes:

D> `check_response’: 504 CRAM-MD5 authentication mechanism not supported
D> (Net::SMTPSyntaxError)

Net::SMTP use CRAM-MD5 if an user is given and no authentification
mechamnism is given

:authentiation => :login }
^^^^^^^^^^^^^^

strange english word :slight_smile:

Guy Decoux

I thought typos were one of the syntactic sugars of Ruby.
:slight_smile:

Stuart

On 8/23/06, Dark A. [email protected] wrote:

I thought typos were one of the syntactic sugars of Ruby.

More like syntactic chili powder :wink: