Defect #1379

Error in sending email notifications: (no implicit conversion to float from nil)

Added by Lee Taylor over 3 years ago. Updated over 3 years ago.

Status:Closed Start date:2008-06-04
Priority:Urgent Due date:2008-06-04
Assignee:Jean-Philippe Lang % Done:

100%

Category:Email notifications
Target version:-
Affected version: Resolution:Invalid

Description

HI all,

First off, thanks to all the work put into this.
We have setup Redmine, and altered the "environment.rb" file (as I'm attaching the file) to try and get our email notifications working. (our server config may be off. we've installed it via a mongrel cluster).

Unfortunately, we are coming up with the following error, and aren't sure how else to proceed in fixing it: An error occurred while sending mail (no implicit conversion to float from nil)

Has this error been resolved before?
Any ideas are appreciated!

Thanks,
Lee

environment.rb (4.5 kB) Lee Taylor, 2008-06-04 22:30

development.log (2.1 kB) Lee Taylor, 2008-06-05 20:06

History

Updated by Jean-Philippe Lang over 3 years ago

Post the stack trace please.

Updated by Lee Taylor over 3 years ago

Hi Jean-Philippe Lang,

What's the easiest way to receive the stack trace with Redmine?
We're new to it, and are just getting familiar.

I'll get it shortly after your reply, as this is an urgent issue for us - currently keeping us from using Redmine.

Thanks,
Lee

Updated by Lee Taylor over 3 years ago

Hi,

I've looked through and noticed we have a couple log files that might communicate the stack trace: "development.log" and "production.log". If these don't show the correct stack trace, please let me know where the correct stack trace is and I'll retrieve it.

Otherwise, here's the "development.log":
  1. Logfile created on Sun May 11 02:53:05 -0400 2008WARNING: You're using the Ruby-based MySQL library that ships with Rails. This library is not suited for production. Please install the C-based MySQL library instead (gem install mysql).
    WARNING: You're using the Ruby-based MySQL library that ships with Rails. This library is not suited for production. Please install the C-based MySQL library instead (gem install mysql).
    WARNING: You're using the Ruby-based MySQL library that ships with Rails. This library is not suited for production. Please install the C-based MySQL library instead (gem install mysql).
    WARNING: You're using the Ruby-based MySQL library that ships with Rails. This library is not suited for production. Please install the C-based MySQL library instead (gem install mysql).
    WARNING: You're using the Ruby-based MySQL library that ships with Rails. This library is not suited for production. Please install the C-based MySQL library instead (gem install mysql).
    WARNING: You're using the Ruby-based MySQL library that ships with Rails. This library is not suited for production. Please install the C-based MySQL library instead (gem install mysql).
    WARNING: You're using the Ruby-based MySQL library that ships with Rails. This library is not suited for production. Please install the C-based MySQL library instead (gem install mysql).
    WARNING: You're using the Ruby-based MySQL library that ships with Rails. This library is not suited for production. Please install the C-based MySQL library instead (gem install mysql).
    WARNING: You're using the Ruby-based MySQL library that ships with Rails. This library is not suited for production. Please install the C-based MySQL library instead (gem install mysql).
    WARNING: You're using the Ruby-based MySQL library that ships with Rails. This library is not suited for production. Please install the C-based MySQL library instead (gem install mysql).
    WARNING: You're using the Ruby-based MySQL library that ships with Rails. This library is not suited for production. Please install the C-based MySQL library instead (gem install mysql).

And here's only a portion (after searching for "test_email" from within the file) that might relate to the email stack trace inside of "production.log":
Processing AdminController#test_email (for 72.207.46.250 at 2008-05-22 00:05:08) [GET]
Session ID: ec54e87f8809654dbe56cdfe2c4ad17a
Parameters: {"action"=>"test_email", "controller"=>"admin"}
Redirected to http://redmine.eliasinteractive.com/settings/edit?tab=notifications
Completed in 0.00988 (101 reqs/sec) | DB: 0.00000 (0%) | 302 Found [http://redmine.eliasinteractive.com/admin/test_email]

Please feel free to let me know if more is needed.

Thanks,
Lee

Updated by Lee Taylor over 3 years ago

Hi there,

Any help on this?

Please let me know if I need to provide any further information.

Thank you,
Lee

Updated by Jean-Philippe Lang over 3 years ago

  • Status changed from New to Closed
  • Affected version deleted (0.7.0)
  • Resolution set to Invalid

This problem is not related to Redmine. The error is raised by the following line of your code:

do_pop_auth if !@pop3_auth_done or (Time.now - smtp_settings[:pop3_auth][:expires]) >= @pop3_auth_done

Updated by Lee Taylor over 3 years ago

  • Status changed from Closed to Reopened

Hi Jean-Phiippe Lang,

Do you have any suggestions on how to correct this?

We received that line of code from the following url: http://wiki.rubyonrails.org/rails/pages/PopBeforeSMTPForActionMailer

We did this in attempt to configure our email correctly (do to another email notification error we were receiving).

Your comments are appreciated, and thank you for your help.
Lee

Updated by Jean-Philippe Lang over 3 years ago

  • Status changed from Reopened to Closed
  • Estimated time deleted (2.00)

Adding something like :expires => 60 in your pop3_auth settings should solve your problem.

Updated by Lee Taylor over 3 years ago

  • Status changed from Closed to Reopened

Thanks Jean-Philippe Lang,

Here's a portion of the environment.rb code that we have, and the issue remains:

  1. SMTP server configuration
    config.action_mailer.smtp_settings = {
    :address => '127.0.0.1',
    :port => 25,
    :domain => 'eliasinteractive.com',
    :pop3_auth => {
    :server => 'mail.eliasinteractive.com',
    :expires => 60,
    :user_name => '',
    :password => 'our_password',
    :authentication => :login
    }
    }

    config.action_mailer.perform_deliveries = true

Any ideas?

Thanks again,
Lee

Updated by Jean-Philippe Lang over 3 years ago

  • Status changed from Reopened to Closed

Make sure you restarted the app after adding :expires => 60
If it still doesn't work, try to get some help on the ruby on rails wiki.

Updated by Lee Taylor over 3 years ago

  • % Done changed from 0 to 100

Thanks so much! It's working and you've been a great help to us.

We simply had to add the :expires => 60 and then restart the app.

Much appreciated,
Lee

Also available in: Atom PDF