Project

General

Profile

Actions

Defect #1379

closed

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

Added by Lee Taylor almost 16 years ago. Updated almost 16 years ago.

Status:
Closed
Priority:
Urgent
Category:
Email notifications
Target version:
-
Start date:
2008-06-04
Due date:
2008-06-04
% Done:

100%

Estimated time:
Resolution:
Invalid
Affected version:

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


Files

environment.rb (4.46 KB) environment.rb Lee Taylor, 2008-06-04 22:30
development.log (2.06 KB) development.log Lee Taylor, 2008-06-05 20:06
Actions #1

Updated by Jean-Philippe Lang almost 16 years ago

Post the stack trace please.

Actions #2

Updated by Lee Taylor almost 16 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

Actions #3

Updated by Lee Taylor almost 16 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

Actions #4

Updated by Lee Taylor almost 16 years ago

Hi there,

Any help on this?

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

Thank you,
Lee

Actions #5

Updated by Jean-Philippe Lang almost 16 years ago

  • Status changed from New to Closed
  • Affected version (unused) 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
Actions #6

Updated by Lee Taylor almost 16 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

Actions #7

Updated by Jean-Philippe Lang almost 16 years ago

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

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

Actions #8

Updated by Lee Taylor almost 16 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

Actions #9

Updated by Jean-Philippe Lang almost 16 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.

Actions #10

Updated by Lee Taylor almost 16 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

Actions

Also available in: Atom PDF