Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save dima731515/2483090845a64079a6835e399b6f8d64 to your computer and use it in GitHub Desktop.
Save dima731515/2483090845a64079a6835e399b6f8d64 to your computer and use it in GitHub Desktop.
Настройка smtp yandex на msmtp на веб-окружении Битрикс
Применительно к веб-окружению Битрикс:
Из главного меню окружения:
6. Manage sites....
затем
4. Change email settings on site
Забиваем поля по любой доступной инструкции. Если почта не отправляется, переходим в /home/bitrix и открываем на редактирование
конфиг .msmtprc, содержание:
#Яндекс
logfile /home/bitrix/msmtp_domain.ru.log
host smtp.yandex.ru
port 465
from info@yandexdomain.ru
keepbcc on
auth on
user info@smtpuser.ru
password smtppassword
tls on
tls_starttls off
tls_certcheck off
#Gmail
Если возникает ошибка "535-5.7.8 Username and Password not accepted." дополнительно нужно настроить доступы к небезопасным приложениям, либо отключить защиту на странице https://myaccount.google.com/lesssecureapps?pli=1
#Goggle оключил возможность подключаться по паре логин и пароль.
#Теперь нужно включать двухфакторную аутентификацию в настройках аккаунта (https://myaccount.google.com/u/1/security)
#После этого в блоке "Вход в аккаунт Google" появится новый пункт "Пароли приложений"
#Там нужно сгенерировать новый пароль
logfile /home/bitrix/msmtp_sitename.ru.log
host smtp.gmail.com
port 587
from user@gmail.com
keepbcc on
auth on
user user@gmail.com
password your_password
tls on
tls_starttls on
tls_certcheck off
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment