Email errors

D

Dark Ambient

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 '(e-mail address removed)'
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 => '(e-mail address removed)',
:password => 'password',
:authentiation => :login }


puts SimpleMailer.deliver_simple_message('(e-mail address removed)')
 
D

Dark Ambient

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)
 
T

ts

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
^^^^^^^^^^^^^^

strange english word :)


Guy Decoux
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top