12 063
правки
(Новая страница: «Emails will be sent from one of your mailboxes, which will be required: *login (for example, "robot@contactless.ru"), *password, *SMTP server address and port (fo…») |
(Новая страница: «Clear the contents of "/etc/ssmtp/ssmtp.conf" and fill in such lines, replacing the data with your own: <syntaxhighlight lang="linux-config"> mailhub=smtp.gmail.c…») |
||
Строка 11: | Строка 11: | ||
*SMTP server address and port (for Gmail mailboxes, it is "smtp.gmail.com:587", for Mail.Ru - "smtp.mail.EN:465"). | *SMTP server address and port (for Gmail mailboxes, it is "smtp.gmail.com:587", for Mail.Ru - "smtp.mail.EN:465"). | ||
Clear the contents of "/etc/ssmtp/ssmtp.conf" and fill in such lines, replacing the data with your own: | |||
<syntaxhighlight lang="linux-config"> | <syntaxhighlight lang="linux-config"> | ||
mailhub=smtp.gmail.com:587 | mailhub=smtp.gmail.com:587 | ||
Строка 18: | Строка 18: | ||
UseTLS=Yes | UseTLS=Yes | ||
UseSTARTTLS=Yes | UseSTARTTLS=Yes | ||
# | #be sure to leave an empty line at the end of the file | ||
# | #To send emails via Google Mail, you must allow sending emails from untrusted apps to your Google account | ||
</syntaxhighlight> | </syntaxhighlight> | ||
To verify that sending email is working, run the [[Консоль /en | console]] command: | |||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
echo 'Test message to check sSMTP new configuration' | ssmtp ivanov@gmail.com | echo 'Test message to check sSMTP new configuration' | ssmtp ivanov@gmail.com | ||
# | # instead ivanov@gmail.com substitute the address of your other box (for example, where you are going to receive notifications from the controller) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
In case of additional questions, see [http://askubuntu.com/questions/185070/why-i-get-hostname-name-or-service-not-known-error] and [https://wiki.archlinux.org/index.php/SSMTP]. | |||
==Предварительная настройка для отправки SMS== | ==Предварительная настройка для отправки SMS== |
правки