Project

General

Profile

Email notifications problem

Added by Cristian Barrue almost 11 years ago

Hello,
This is the data i get from running

sudo RAILS_ENV=production ruby script/about
/var/lib/gems/1.8/gems/coderay-1.0.9/lib/coderay/helpers/file_type.rb:19: warning: already initialized constant UnknownFileType
/var/lib/gems/1.8/gems/coderay-1.0.9/lib/coderay/helpers/file_type.rb:126: warning: already initialized constant TypeFromExt
/var/lib/gems/1.8/gems/coderay-1.0.9/lib/coderay/helpers/file_type.rb:132: warning: already initialized constant TypeFromShebang
/var/lib/gems/1.8/gems/coderay-1.0.9/lib/coderay/helpers/file_type.rb:138: warning: already initialized constant TypeFromName

Environment:
Redmine version 2.3.1.stable
Ruby version 1.8.7 (i686-linux)
Rails version 3.2.13
Environment production
Database adapter Mysql2

I am new to redmine and also somewhat with linux which I just use as server. I have installed the basics of redmine without issues, but I am having serious problems configuring the email notification system. I have followed the instructions and visited the different threads about this issue that leads one to think that this is a spread problem with several sides and dependencies.

This is my config.yml:

production:
email_delivery:
delivery_method: :smtp
smtp_settings:
tls: true
enable_starttls_auto: true
openssl_verify_mode: false
address: "smtp.googlemail.com"
port: 465
domain: "smtp.googlemail.com" # 'your.domain.com' for GoogleApps
authentication: :plain
user_name: ""
password: "pass"

Produces this error when trying to send the test email:

An error occurred while sending mail (wrong argument (FalseClass)! (Expected kind of OpenSSL::SSL::SSLContext))

I read that there is a problem with ssl and emailer 2.5.4...I tried unsintalling mail 2.5.4 and installing mail 2.5.3 but then I got problems launching redmine because dependencies with capybara.

I really want to use redmine from the different options I have tried so far for project management, but installing it is becoming a nightmare. I hope anyone can help me so I can set up email notifications which are quite a must-have in project management and groupware.

Even if the solution passes for using a free smtp server with no authentication that saves the broken status of the ssl based email system, I am up to anything.

Thanks in advance,

Cristian


Replies (5)

RE: Email notifications problem - Added by Jan Niggemann (redmine.org team member) almost 11 years ago

Hi Cristian,

first of all: Depending on your distro, your version of ruby is no longer maintained and might have security issues.
Please read Important: Ruby 1.8.7 out of support
What distribution do you use?
Please post the output of ruby -v.

What error do you get if you use the example from EmailConfiguration?

production:
  email_delivery:
    delivery_method: :smtp
    smtp_settings:
      enable_starttls_auto: true
      address: "smtp.gmail.com" 
      port: '587'
      domain: "smtp.gmail.com" 
      authentication: :plain
      user_name: "your_email@gmail.com" 
      password: "your_password" 

Note: IIRC, whitespace matters.

The stack isn't really a nightmare, it's proably just something that's new to you... You'll learn and get used to it :-)
If you need help, just post here---

RE: Email notifications problem - Added by Cristian Barrue almost 11 years ago

Lets see:

ruby -v
ruby 1.8.7 (2011-06-30 patchlevel 352) [i686-linux]

If I need to upgrade it, how is that done? I used the install instructions from the web (both redmine and ruby)


Ok, using the configuration for gmail described in the documentation I get this error:

An error occurred while sending mail (wrong argument (NilClass)! (Expected kind of OpenSSL::SSL::SSLContext))

Thanks so much for answering!
From what I have read in other posts, many people has had the same issue since long time ago, and solutions that work for some does not for others. I have tried them all.

RE: Email notifications problem - Added by Jan Niggemann (redmine.org team member) almost 11 years ago

What distribution do you use?
Did you install ruby from a repository, i.e. using apt-get or aptitude or yum or something like that?

RE: Email notifications problem - Added by Cristian Barrue almost 11 years ago

NAME="Ubuntu"
VERSION="12.04.1 LTS, Precise Pangolin"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu precise (12.04.1 LTS)"
VERSION_ID="12.04"

As far as I remember, using apt-get

Do you recommend upgrading ruby?

RE: Email notifications problem - Added by Jan Niggemann (redmine.org team member) almost 11 years ago

IIRC Ubuntu 12.04 LTS gets backported security fixes, should that be the case there's no need to update ruby for security reasons.
On the other side, rails 3.2.x is the last branch to support Ruby 1.8.7, so sooner or later you'll have to upgrade ruby.

The decision if you should upgrade or not is somewhat difficult, as it depends on your machine and the services running on them.
If it's a virtual machine, just take a snapshot, upgrade and see if all is OK. If not, restore to snapshot. Else, backup the whole machine before potentially messing it up. I don't know Ubuntu, but is sure has some kind of "software center" where you probably find ruby 1.9.3 or newer...

    (1-5/5)