Project

General

Profile

OpenSSL error when sending email after upgrade from 2.2.4 to 2.3.1

Added by Jorge Cabrera almost 11 years ago

Hi, I recently upgraded my Redmine installation from version 2.2.4 to 2.3.1. Everything worked fine except email notifications. When I click on send a test email I get the following error:

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

I send email using Exchange Online and my configuration.yml looks like this:

production:
  email_delivery:
    delivery_method: :smtp
    smtp_settings:
      enable_starttls_auto: true
      address: "pod51016.outlook.com" 
      port: '587'
      authentication: :login
      user_name: "theuser@thedomain" 
      password: "thepassword" 

I read in some posts and in Redmine's Email Configuration Guide that setting enable_starttls_auto to false can fix some things, done that and then I get authentication login problems.

Am I the only one with this problem? Can someone please help me out? I don't want to go back to previous version because of this.


Replies (9)

RE: OpenSSL error when sending email after upgrade from 2.2.4 to 2.3.1 - Added by Marcin Trendota almost 11 years ago

Same here (i've just upgraded from 1.4.1). My config:

production:
  email_delivery:
    delivery_method: :smtp
    smtp_settings:
      address: the.domain
      port: 25
      domain: the.domain
      authentication: :plain
      tls: true
      user_name: "redmine" 
      password: "koolpassword"                                                                   

RE: OpenSSL error when sending email after upgrade from 2.2.4 to 2.3.1 - Added by Anonymous almost 11 years ago

Yes, I have them same problem (my redmine running on 443 port) from redmine 2.3.0 and 2.3.1 email sending have problem. Here is my post about this problem http://www.redmine.org/boards/2/topics/37850
But from my post there nothing fix :(

RE: OpenSSL error when sending email after upgrade from 2.2.4 to 2.3.1 - Added by Peter Panther almost 11 years ago

The problem

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

ist caused by the gem package 'mail' in version 2.5.4 (released on the 14th of may 2013)
(for further details have a look at https://github.com/mikel/mail/issues/548)

All Redmine installations/updates after this date will have the TLS-negotiation problem if ruby 1.8.7 is still used.
Downgrade to version 2.5.3 and TLS-encryption works as before......

RE: OpenSSL error when sending email after upgrade from 2.2.4 to 2.3.1 - Added by Anonymous almost 11 years ago

I use ruby ruby 1.9.3p374 (2013-01-15 revision 38858) [centos 5.8] and mail (2.5.4, 2.5.3, 2.4.4). And my redmine still have problem with sending email. So, I will try to remove mail 2.5.4 for test what Peter Panther talk

RE: OpenSSL error when sending email after upgrade from 2.2.4 to 2.3.1 - Added by Anonymous almost 11 years ago

Downgrade mail to version 2.5.3 and the problem is not change. So I have to wait for the next release of redmine :(

RE: OpenSSL error when sending email after upgrade from 2.2.4 to 2.3.1 - Added by Anonymous almost 11 years ago

The problem solved when I change sendmail to GMAIL by setting bellow:

email_delivery:
delivery_method: :smtp
smtp_settings:
tls: true
enable_starttls_auto: true
openssl_verify_mode: 'none'
address: "smtp.googlemail.com"
port: '465'
domain: "smtp.googlemail.com"
authentication: :plain
user_name: "my-email@gmail.com"
password: "my-password"

RE: OpenSSL error when sending email after upgrade from 2.2.4 to 2.3.1 - Added by Tomas Latal over 10 years ago

Downgrading to mail 2.5.3 and changing dependency in Gemfile.lock from mail 2.5.4 to 2.5.3 worked for me. Thank you guys.

    (1-9/9)