SocketError in EmailController#correspond


#1

SocketError in EmailController#correspond
getaddrinfo: no address associated with hostname.

Please see above, these are the errors i get when i try to email a user
on my networking site. Can you help please.

Actionmailer address = smtp.vodafone.ie

Below is code used for the email controller in
apps/controllers/email_controller.rb There doesnt seem to be any code
missing. Can someone help with this error, are there any possible
solutions???

Thanks.

class EmailController < ApplicationController
layout “site”
include ApplicationHelper
include ProfileHelper
before_filter :protect, :only => [ “correspond” ]

def remind
@title = “Mail me my login information”
if param_posted?(:user)
email = params[:user][:email]
user = User.find_by_email(email)
if user
UserMailer.deliver_reminder(user)
flash[:notice] = “Login information was sent.”
redirect_to :action => “index”, :controller => “site”
else
flash[:notice] = “There is no user with that email address.”
end
end
end

def correspond
user = User.find(session[:user_id])
recipient = User.find_by_user_name(params[:id])
@title = “Email #{recipient.name}”
if param_posted?(:message)
@message = Message.new(params[:message])
if @message.valid?
UserMailer.deliver_message(
:user => user,
:recipient => recipient,
:message => @message,
:user_url => profile_for(user),
:reply_url => url_for(:action => “correspond”,
:id => user.user_name)
)
flash[:notice] = “Email sent.”
redirect_to profile_for(recipient)
end
end
end
end


#2

Aoife,

does your server have a DNS server set in the network settings so it
can determine the ip address for that domain?

Just did an nslookup on that domain:

tretch$ nslookup smtp.vodafone.ie
Server: 68.87.76.178
Address: 68.87.76.178#53

Non-authoritative answer:
*** Can’t find smtp.vodafone.ie: No answer

Sounds like it can’t be found. ping doesn’t work either.

Al

On Feb 8, 4:49 am, Aoife D. removed_email_address@domain.invalid


#3

stretch wrote:

Aoife,

does your server have a DNS server set in the network settings so it
can determine the ip address for that domain?

Just did an nslookup on that domain:

tretch$ nslookup smtp.vodafone.ie
Server: 68.87.76.178
Address: 68.87.76.178#53

Non-authoritative answer:
*** Can’t find smtp.vodafone.ie: No answer

Sounds like it can’t be found. ping doesn’t work either.

Al

On Feb 8, 4:49�am, Aoife D. removed_email_address@domain.invalid
Hi,

Thanks for that. Yes i didnt actually find that address anywhere i just
assumed it was correct as it was used by another person, i found out
previously through another forum.

I have just changed over to my eircom broadband and used the
smtp.eircom.net address which i have found to be correct. But im still
getting an error, it’s now saying it is rejecting the address but they
are both valid email addresses. What could i be leaving out?? Im lost
with this one!

Thanks in advance,

Aoife.

Current Error:
Net::SMTPFatalError in EmailController#correspond
553 sorry, syntax error or rejected address, please forward to your
postmaster (#5.7.1)

Application Trace | Framework Trace | Full Trace
C:/Ruby/lib/ruby/1.8/net/smtp.rb:679:in check_response' C:/Ruby/lib/ruby/1.8/net/smtp.rb:652:ingetok’
C:/Ruby/lib/ruby/1.8/net/smtp.rb:630:in mailfrom' C:/Ruby/lib/ruby/1.8/net/smtp.rb:543:insend0’
C:/Ruby/lib/ruby/1.8/net/smtp.rb:471:in sendmail' C:/Ruby/lib/ruby/gems/1.8/gems/actionmailer-2.0.2/lib/action_mailer/base.rb:588:inperform_delivery_smtp’
C:/Ruby/lib/ruby/1.8/net/smtp.rb:378:in start' C:/Ruby/lib/ruby/1.8/net/smtp.rb:315:instart’
C:/Ruby/lib/ruby/gems/1.8/gems/actionmailer-2.0.2/lib/action_mailer/base.rb:586:in
perform_delivery_smtp' C:/Ruby/lib/ruby/gems/1.8/gems/actionmailer-2.0.2/lib/action_mailer/base.rb:469:insend
C:/Ruby/lib/ruby/gems/1.8/gems/actionmailer-2.0.2/lib/action_mailer/base.rb:469:in
deliver!' C:/Ruby/lib/ruby/gems/1.8/gems/actionmailer-2.0.2/lib/action_mailer/base.rb:352:inmethod_missing’
app/controllers/email_controller.rb:31:in `correspond’