Project

General

Profile

redmine can't send test email

Added by eleith - over 15 years ago

this is the error message i get:

An error occurred while sending mail (hostname was not match with the server certificate)

i am running redmine latest from svn, rails 2.2.2 and deploying through passenger+nginx

googling around for that error leads me to a ticket in rails (claimed to be fixed in 2.3.2). something to do with forcing tsl authentication instead of making it optional.

my mail server resides on the same machine deploying redmine, so the email.ym is configured for smtp to localhost, with authentation: :none, and tsl or ssl should not even be used.

unfortunately, i can't test with rails 2.3.2 because passenger+redmine doesn't seem to work when i force redmine to use rails 2.3.2 in environment.rb.

any suggestions on how i can get email working?


Replies (3)

RE: redmine can't send test email - Added by Philippe Creux over 15 years ago

You can patch rails 2.2.2 actionmailer.

Edit .../gems/actionmailer-2.2.2/lib/action_mailer/base.rb, go to line 670 and change:
smtp.enable_starttls_auto if smtp.respond_to?(:enable_starttls_auto)
to
smtp.enable_starttls_auto if smtp_settings[:enable_starttls_auto] && smtp.respond_to?(:enable_starttls_auto)

That way, Rails will not use tls.

Cheerios,

Philippe

RE: redmine can't send test email - Added by eleith - over 15 years ago

that works. i also had to use my fqhn instead of "localhost" for the server.

thanks again philippe. i am now completely satisfied after my migration from trac!

RE: redmine can't send test email - Added by Philippe Creux over 15 years ago

cowl! You might be interested in using :async_smtp instead of :smtp to speed-up tickets update. More info on Email_Configuration.

    (1-3/3)