Suppose I have a domain and a server where it is associated, a web application is deployed on it with the ability to confirm registration via mail which I called 'no-reply@domain.com', in my case it is Yandex mail, I have already attached a domain to it, but it takes time, and if you send from this mail to the same gmail, the letter arrives with the note 'The Gmail system could not confirm that this letter was sent from the domain', and this is what I’m writing, the letters from the application do not come at all, and judging by the logs they are sent without errors, in the application I wrote smtp with such con Figs:

config.action_mailer.smtp_settings = { address: 'smtp.yandex.ru', tls: true, port: 465, domain: 'yandex.ru', authentication: 'plain', enable_starttls_auto: true, user_name: Rails.application.secrets.email_provider_username, password: Rails.application.secrets.email_provider_password } 

The essence of the question is whether it is necessary to confirm binding to the domain on Yandex.mail so that the letters finally reach? For I have the exact same project with a different name, everything works with a bang. Ie in the code problems can not be.

  • Do you have the config.action_mailer.raise_delivery_errors = true option for the dev environment in the config? To be sure that there are no errors - Yauhen
  • At one time, when binding smtp Yandex also did not leave the letter. As it turned out, it was required to go under this account once through the browser, then the letters flew. - Nik
  • @Yauhen yes enabled, I see in my Yandex passport that I tried to get access to the mail, set up a two-factor, and a password for the application, but the letters do not reach. - Yevgen 2:49

1 answer 1

Here is my working configuration, can help

 config.action_mailer.delivery_method = :smtp config.action_mailer.raise_delivery_errors = true config.action_mailer.smtp_settings = { user_name: 'mailer@example.com', password: 'secret', authentication: 'plain', address: 'smtp.yandex.ru', domain: '127.0.0.1', port: 587, enable_starttls_auto: true }