Forum: Ruby on Rails Action Mailer Error!!!

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Mohammad R. (Guest)
on 2006-04-27 07:46
What does this mean?
Bad file descriptor - connect(2)
Steve L. (Guest)
on 2006-04-27 07:53
(Received via mailing list)
I would suspect you are having trouble connecting to the database,
however,
it would be more helpful if you included an error trace or more detail
of
any kind.  Figuring out errors from a single line not always the best
way to
get results on a mailing list...
Mohammad R. (Guest)
on 2006-04-27 08:01
C:/InstantRails/ruby/lib/ruby/1.8/net/protocol.rb:206:in `initialize'
C:/InstantRails/ruby/lib/ruby/1.8/net/protocol.rb:206:in `old_open'
C:/InstantRails/ruby/lib/ruby/1.8/timeout.rb:56:in `timeout'
C:/InstantRails/ruby/lib/ruby/1.8/timeout.rb:76:in `timeout'
C:/InstantRails/ruby/lib/ruby/1.8/net/protocol.rb:206:in `old_open'
C:/InstantRails/ruby/lib/ruby/1.8/net/smtp.rb:393:in `do_start'
C:/InstantRails/ruby/lib/ruby/1.8/net/smtp.rb:378:in `start'
C:/InstantRails/ruby/lib/ruby/1.8/net/smtp.rb:316:in `start'
C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/actionmailer-1.2.1/lib/action_mailer/base.rb:447:in
`perform_delivery_smtp'
C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/actionmailer-1.2.1/lib/action_mailer/base.rb:333:in
`deliver!'
C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/actionmailer-1.2.1/lib/action_mailer/base.rb:258:in
`deliver'
#{RAILS_ROOT}/app/controllers/test_controller.rb:13:in `sendmail'
C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/base.rb:910:in
`perform_action_without_filters'
C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/filters.rb:368:in
`perform_action_without_benchmark'
C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/benchmarking.rb:69:in
`perform_action_without_rescue'
C:/InstantRails/ruby/lib/ruby/1.8/benchmark.rb:293:in `measure'
C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/benchmarking.rb:69:in
`perform_action_without_rescue'
C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/rescue.rb:82:in
`perform_action'
C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/base.rb:381:in
`process_without_filters'
C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/filters.rb:377:in
`process_without_session_management_support'
C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/session_management.rb:117:in
`process'
C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/dispatcher.rb:38:in
`dispatch'
C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/webrick_server.rb:115:in
`handle_dispatch'
C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/webrick_server.rb:81:in
`service'
C:/InstantRails/ruby/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
C:/InstantRails/ruby/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
C:/InstantRails/ruby/lib/ruby/1.8/webrick/server.rb:173:in
`start_thread'
C:/InstantRails/ruby/lib/ruby/1.8/webrick/server.rb:162:in
`start_thread'
C:/InstantRails/ruby/lib/ruby/1.8/webrick/server.rb:95:in `start'
C:/InstantRails/ruby/lib/ruby/1.8/webrick/server.rb:92:in `start'
C:/InstantRails/ruby/lib/ruby/1.8/webrick/server.rb:23:in `start'
C:/InstantRails/ruby/lib/ruby/1.8/webrick/server.rb:82:in `start'
C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/webrick_server.rb:67:in
`dispatch'
C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/commands/servers/webrick.rb:59
C:/InstantRails/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in
`require'
C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:147:in
`require'
C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/commands/server.rb:30
C:/InstantRails/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in
`require'
C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:147:in
`require'
script/server:3
Mohammad R. (Guest)
on 2006-04-27 09:42
Anyone know what error caused this?
Mohammad (Guest)
on 2006-04-27 16:04
Here is some of my code:
ActionMailer::Base.server_settings = {
:address => "localhost",
:port => 25,
:domain => "localhost",
:authentication => :login,
:user_name => "Mohammad",
:password => "bob",
}
ActionMailer::Base.perform_deliveries = true
ActionMailer::Base.raise_delivery_errors = true
ActionMailer::Base.default_charset = "utf-8"

and then

def sendmail
 user = User.find(:first, :conditions => "id = 1")
 email = UserMailer.create_confirm(user)
 email.set_content_type("text/html")
 UserMailer.deliver(email)
 render :text => "Thank you..."
end

Also the address, username, and password are fake but, i've been told
that it would still work.
Rodney R. (Guest)
on 2006-04-27 16:19
(Received via mailing list)
are you running sendmail or any other MTA ?
it looks like your timing out on connection to your smtp server
don't think it rails related persee.

rodney
Mohammad (Guest)
on 2006-04-27 17:39
Rodney R. wrote:
> are you running sendmail or any other MTA ?
> it looks like your timing out on connection to your smtp server
> don't think it rails related persee.
\There is no SMTP server do you know where I can get a free one that has
no SSL?
Mohammad (Guest)
on 2006-04-27 18:58
Ok I got it set to a hotpop acct. But now I got this error:
getaddrinfo: no address associated with hostname.

My config:
ActionMailer::Base.server_settings = {
:address => "gamebox.com",
:port => 25,
:domain => "gamebox.com",
:authentication => :login,
:user_name => "removed_email_address@domain.invalid",
:password => "secret",
}
ActionMailer::Base.perform_deliveries = true
ActionMailer::Base.raise_delivery_errors = true
ActionMailer::Base.default_charset = "utf-8"
Mohammad (Guest)
on 2006-04-27 23:06
Bump...
Mohammad (Guest)
on 2006-04-28 00:25
What does this error mean:
535 authorization failed (#5.7.0)
I've been trying diffrent host and each one has either that error or
this error:
Bad file descriptor - connect(2)
Mohammad (Guest)
on 2006-04-28 17:20
Does anyone know how I can get a SMTP host?
Peter De Berdt (Guest)
on 2006-04-28 18:02
(Received via mailing list)
On 28 Apr 2006, at 15:20, Mohammad wrote:

> Does anyone know how I can get a SMTP host?

The problem is that due to spam relaying, their are few providers
that will allow you to send mail using their SMTP server.

1. Install one on your own server, however, keep in mind that a lot
of servers don't accept mail if the IP doesn't resolve to a domain
name. Most servers have postfix running, so you can just send them
through localhost
2. Use Hotpop.com, you'll have to register for an account, but it's
free (well, they should send you ads, but I have never had one in the
three years I have my account there, maybe because I'm living in
Europe). It will allow you to send a certain number of e-mails using
their servers within a certain timeframe (to avoid spam abuse)
3. Use your ISP's SMTP server. They use your IP to allow/disallow
mail from being sent through.

What are you trying to do and where are you hosting your application?


Best regards

Peter De Berdt
This topic is locked and can not be replied to.