Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

An error occurred while sending mail (SSL_connect returned=1 errno=0 state=SSLv2/v3 read server hello A: unknown protocol)

configuration.yml

development:
   email_delivery:
     delivery_method: :smtp
     smtp_settings:
      #tls: true
       #enable_starttls_auto: true
       openssl_verify_mode: 'none'
       address: "domain name" 
       port: 25
       authentication: :login
       domain: 'mail domail name'
       user_name: 'mail id'
       password: 'pwd'

this code use to for the following error occurs

An error occurred while sending mail:

SSL_connect returned=1 errno=0 state=SSLv2/v3 read server hello A: unknown protocol


development:
email_delivery:
delivery_method: :smtp
smtp_settings:
tls: true
enable_starttls_auto: true
openssl_verify_mode: 'none'
address: "domain name" 
port: 587
authentication: :login
domain: 'mail domail name'
user_name: 'mail id'
password: 'pwd'

this code use to for the following error occurs

An error occurred while sending mail:

No connection could be made because the target machine actively refused it. - connect(2)


development:
email_delivery:
delivery_method: :async_smtp
smtp_settings:
tls: true
enable_starttls_auto: true
openssl_verify_mode: 'none'
address: "domain name" 
port: 25
authentication: :login
domain: 'mail domail name'
user_name: 'mail id'
password: 'pwd'

no error occurs but still not received mail on the user.

development:
email_delivery:
delivery_method: :smtp
smtp_settings:
tls: true
enable_starttls_auto: true
openssl_verify_mode: 'none'
address: "domain name" 
port: 25
authentication: :login
domain: 'mail domail name'
user_name: 'mail id'
password: 'pwd'

this code to use redmine version 2.2.3 to use work with fine. but version 2.3.0 to use not working now.

like image 882
user2273697 Avatar asked Apr 15 '13 13:04

user2273697


1 Answers

After fighting with this issues for several hours this is what I came up with (works for me)

email_delivery:
  delivery_method: smtp
  smtp_settings:
    openssl_verify_mode: none
    tls: false
    enable_starttls_auto: true
    address: smtp.xxx.xx
    port: 587
    domain: xxx.xx
    authentication: login
    user_name: "[email protected]"
    password: xxx

make sure that the address matches the domain and it can be resolved

like image 62
Peuczynski Avatar answered Nov 17 '22 11:11

Peuczynski