M
M
Monitorkin2017-05-31 14:01:14
Yandex
Monitorkin, 2017-05-31 14:01:14

How to set up sending letters to 1C-Bitrix when the mail is on Yandex?

Hello, I'm asking for help, I just don't want to send mail.
what is installed:

  • Bitrix virtual appliance version 7.0.1
  • 1C-Bitrix: Site management 17.0.5
  • two sites in the directory /home/bitrix/ext_www (site1.ru, site2.ru)
  • DNS domain site2.ru: dns1.yandex.net, dns2.yandex.net
  • mail is not configured for site1.ru, it is configured for site2.ru

.msmtprc file:
# smtp account configuration for site2.ru
account site2.ru
logfile /home/bitrix/msmtp_site2.ru.log
host smtp.yandex.ru
port 587
from [email protected]
keepbcc on
auth on
user [email protected]
password PASSWORD
tls on
tls_certcheck off
tls_starttls on

Problem: Mail is not sent. with these login and password, I normally go to the web mail interface of this mailbox.
From the console I do:
php -r "mail('[email protected]', 'Test', 'Test');"

in response I get: msmtp: account default not found in /etc/msmtprc
BUT! if you check with the mail function from php, then in the logs:
host=smtp.yandex.ru tls=on auth=on [email protected] [email protected] [email protected] smtpstatus=535 smtpmsg='535 5.7.8 Error: authentication failed: Invalid user or password!' errormsg='authentication failed (method PLAIN)' exitcode=EX_NOPERM

tried methods: method PLAIN and method LOGIN, the result is the same..
What's wrong??!

Answer the question

In order to leave comments, you need to log in

4 answer(s)
V
Viktor Taran, 2017-05-31
@shambler81

account default
logfile /home/bitrix/msmtp_default.log
host smtp.yandex.ru
port 587
from [email protected]______________________
keepbcc on
auth on
user [email protected]_______________
password ____________________
tls on
tls_certcheck off
tls_starttls on

and do not forget in the Yandex mail account itself, allow sending mail through a third-party server

M
Monitorkin, 2017-05-31
@Monitorkin

earned! After I entered a new password in the access control in "Application passwords" and set it instead of the password for web mail ....

A
AHMETSHIN, 2017-11-01
@AHMETSHIN

Thank you. Until the number and email in the Yandex passport were tied, it didn’t work

V
voprosenok, 2018-09-27
@voprosenok

The method PLAIN and method LOGIN error occurs on gmail as a result of disallowing "insecure applications" to fix, you need to change the security policy, then everything will work.
https://myaccount.google.com/lesssecureapps
Please note that this setting must be allowed by the domain administrator.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question