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
-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to