Open link in a new tab

Content

Expand project menu

Issue with Email

Hi all - new here to Open Project and I am trying to configure my email. I edited the config.yml page got rid of everything except ( see below ) and I keep getting the same error when I am trying to send a test email.

An error occurred while sending mail (hostname “localhost” does not match the server certificate) any ideas?

  1. default configuration options for all environments
    default:
    # Outgoing emails configuration (see examples above)
    email_delivery_method: :smtp
    smtp_address: smtp.example.net
    smtp_port: 25
    smtp_domain: example.net
    smtp_authentication: :login
    smtp_user_name: “openproject@example.net”
    smtp_password: “my_openproject_password”
  1. specific configuration options for development environment
  2. that overrides the default ones
    development:
    email_delivery_method: :letter_opener
  1. Configuration for the test environment
    test:
    email_delivery_method: :test
Message actions

Was actually able to send a test message. However the message is coming from my old email *****gmail.com and I want to change it to ***gmail.com. I do so and then the emails don’t send anymore. Any ideas?

Also, there are some performance issues with Open Project on my machine. I am using Apache2.

Message actions

Hello, I am also having performance issues running bundle exec rails s

Any help is appreciated!

Happy Holidays!

Message actions

Anyone available for some help? I am getting another error(ugh) Thanks!

An error occurred while sending mail (Failure in opening uri #<URI::Generic:0xd22664c URL:/home/openproject/openproject/tmp/letter_opener/1388677775_5450340/plain.html> with options {}: Can’t convert URI::Generic into String.)

Message actions

Hi Robert,

where did you changed the emission email address, in the admin area under ‘Settings/Email notifications’?

In which context was this error thrown?

Best
Christian

Message actions

Christian

Yes that is correct. Any suggestions?

Thanks for getting back

Message actions

Hi Robert,

if you wanna use a gmail account you have to set additional smtp settings like this:

email_delivery_method: :smtp
smtp_address: smtp.gmail.com
smtp_port: 587
smtp_domain: smtp.gmail.com
smtp_user_name: you@gmail.com
smtp_password: your_gmail_pwd
smtp_enable_starttls_auto: true
smtp_authentication: plain

You can find a list with all smtp options here

Best
Christian

Message actions

Thank you. Where does that file go?

I am deploying with Unicorn

Message actions

Actually when I add the files in configuration.yml (it sets Unicorn on a hook and doesn’t work)

Message actions

Hi Christian… I got a little further. What is the issue with

An error occurred while sending mail (hostname “localhost” does not match the server certificate)

Thanks!@

Message actions

Hi Robert,

setting the following option should work:

smtp_openssl_verify_mode: ‘none’

You should include all smpt settings in ‘config/configuration.yml’

Best
Christian

Message actions

Christian Ratz wrote:

Hi Robert,

setting the following option should work:

smtp_openssl_verify_mode: ‘none’

You should include all smpt settings in ‘config/configuration.yml’

Best
Christian

Hi Christian

I have a problem with sending email also, in my case I have to return this message: An error occurred while sending mail (getaddrinfo: Name or service not known).
I’ve done research and found no solution.

Message actions

Hi Luiz,

sounds like the specified smtp server doesn’t exists you should check your smtp settings again.

Best
Christian

Message actions

Christian Ratz wrote:

Hi Luiz,

sounds like the specified smtp server doesn’t exists you should check your smtp settings again.

Best
Christian

I made all the settings according to my provider.

  1. default configuration options for all environments
    default:
    email_delivery_method: :smtp
    smtp_address: “openproject@arcadian.com.br”
    smtp_port: 80
    enable_starttls_auto: “true”
    smtp_domain: “smtpout.secureserver.net”
    smtp_authentication: “plain”
    smtp_user_name: “openproject@arcadian.com.br”
    smtp_password: “xxxxxx”
    smtp_openssl_verify_mode: “none”
Message actions

Hi Luis,

looks like this stackoverflow should fix your problem

Best
Christian

Message actions

Christian Ratz wrote:

Hi Luis,

looks like this stackoverflow should fix your problem

Best
Christian

It worked, thanks Christian

Message actions

Hi Christian!

Thanks for your help. I added the line like you said, but still the same. Here is what I have

  1. Outgoing emails configuration (see examples above)
    email_delivery:
    delivery_method: :smtp
    smtp_settings:
    address: smtp.gmail.com
    port: 587
    domain: smtp.gmail.com (what is the domain?)
    authentication: :login
    user_name: “mrw5641@gmail.com”
    password: “”
    smtp_openssl_verify_mode: ‘none’
Message actions

It seems like no matter what settings I change it reverts back to local host error. (even with all settings removed)

Message actions

Hi Christian, there is on thing I think you are missing in the installation instructions with the email.

I found that adding config.action_mailer.smtp_settings = { enable_starttls_auto: false } to the application.rb will get rid of the local host problem and that it allows for test emails.

Message actions

Hi Christian sorry to keep bothering you ;-). I have two servers running open project with the same settings. I got the email working on my test server fine. I am trying to deploy the email on my second server. But I keep getting the error with

Failure in opening uri #<URI::Generic:0xe9a1ee8 URL:/home/openproject/openproject/tmp/letter_opener/1388784738_5a0907d/plain.html

Would it help to delete that file and then regenerate?

here is the full error.

An error occurred while sending mail (Failure in opening uri #<URI::Generic:0xe523754 URL:/home/openproject/openproject/tmp/letter_opener/1388785321_de7db95/plain.html> with options {}: Can’t convert URI::Generic into String.)

Message actions

Hi Michael,

your second servers runs in production or in development mode?

Best
Christian

Message actions

Hi Christian. Well, I was working with 2 servers,I got one to work — I didn’t have that error. I am just trying to resolve the error above. It is running in production.

Message actions

Hi Michael,

I thought the second server runs in production which explains this error a bit because ‘letter opener’ ist only available in development mode.
Did you set the following setting for production?

email_delivery_method: :letter_opener

instead of

email_delivery_method: :smtp

Best
Christian

Message actions

I will check that out. I think right now it is set for smtp.

I will try it

Thank you!

Message actions

Not sure what else to do. I tried both settings in Development and I still get the same error. It seems no matter what I try the same error keeps popping up.

Message actions

I managed to get past that error finally. by changing a setting in development.rb from letter_opener to smtp.. Now I am getting this .

An error occurred while sending mail (Connection refused - connect(2))

Message actions

yay. I got it to work!

Thanks Christian!

Message actions

Hello All,

I successfully configured OpenProject in Ubuntu Environment. Also put email configuration as mentioned in config file. Now, when I am trying to send a test mail then the application shows email sent successfully but I can’t receive email notification. I check log also it will show at the end:
“Completed 302 Found in 353.4ms (ActiveRecord: 32.0ms)”

My Email settings are:

  1. default configuration options for all environments
    default:
    email_delivery_method: :smtp
    openssl_verify_mode: ‘none’
    smtp_address: smtp.example.com
    smtp_port: 25
    smtp_domain: example.com
    smtp_authentication: :login
    smtp_user_name: “openproject@example.com”
    smtp_password: “****”
Message actions

Hello Everyone;

Does anyone knows the settings to send mail using Office 365?…

I get this error when trying to send a test email:

An error occurred while sending mail (504 5.7.4 Unrecognized authentication type )

I’ve tried PLAIN and LOGIN on SMTP_AUTHENTICAITON but get the same error.

This configuration should work, because I already have another service (ServiceDesk Plus) with the same email account… the only thing is that in SDP I don’t have to set that parameter.

Thanks in advanced.

Message actions

For the main Topic

hostname “localhost” does not match the server certificate)

I fixed it in another way.

In your config folder, in Application.rb, type the following line.

config.action_mailer.smtp_settings ={enable_startssl_auto:false}

I used sendmail, with a no-reply address, but it should work for any other config with that error message.