An error occurred while sending mail (Net::ReadTimeout with #<Socket:(closed)>)

118 Views Asked by At

This is redmine set-up: details

Environment:
  Redmine version                5.1.1.stable
  Ruby version                   3.0.2-p107 (2021-07-07) [x86_64-linux-gnu]
  Rails version                  6.1.7.6
  Environment                    production
  Database adapter               Mysql2
  Mailer queue                   ActiveJob::QueueAdapters::AsyncAdapter
  Mailer delivery                smtp
Redmine settings:
  Redmine theme                  Default
SCM:
  Git                            2.34.1
  Filesystem                     
Redmine plugins:
  no plugin installed

This is my file location :- /home/ubuntu/redmine-5.1.1/config/configuration.yml

# specific configuration options for development environment
# that overrides the default ones
production:
  email_delivery:
    delivery_method: :smtp
    smtp_settings:
      #ssl: true
      #tls: true
      enable_starttls_auto: true
      #openssl_verify_mode: 'none'
      address: "smtp.office365.com"
      port: 587
      #domain: "" # Replace with your domain
      authentication: :login
      user_name: "google.com" # Replace with your Office 365 email address
      password: "*******" # Replace with your Office 365 email password 

when we try to send test gmail it will show this error

screenshot of an error

can you please help as to solve this error

An error occurred while sending mail (Net::ReadTimeout with #<Socket:(closed)>)

when we do telnet with SMTP.office365 587 works. when an open port on the security group is also anywhere (587). Any other thing to do for SMTP so we can send test emails?

0

There are 0 best solutions below