I
I
Ivan Vekov2017-11-03 13:03:41
PHP
Ivan Vekov, 2017-11-03 13:03:41

BitrixVM 7 - how to set up msmtp?

BitrixVM costs the latest version, letters do not always leave the server. More precisely, they are sent only through the command line with this command:
echo -e "test message" | msmtp --debug -t -i [email protected]
And when I use PHP's mail() function, nothing happens. More precisely, I write it like this:

if(mail("[email protected]", "TEST SUBJECT", "TEST BODY"))
echo "Почтовая система работает!";
else
echo "Неудача, почтовая система не работает, попробуйте еще!";

Writes "The mail system is working."

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexey Emelyanov, 2017-11-03
@babarun

Have you configured smtp through the vm menu?

A
Ainur Valiev, 2019-08-23
@vaajnur

stupidly install sendmail and open port 25

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question