A
A
avprinciple2019-03-21 23:48:44
PHP
avprinciple, 2019-03-21 23:48:44

Not receiving email from PHP form. VestaCP?

Hello!
Installed Ubuntu 18, Vesta CP nginx + php-fpm
There is a php+ajax form that sends a message (POST) to a mailbox. I send via the standard mail() function.
I tested it on a free hosting - it works , it comes to the mail, then the problem is in the configuration on the server.
What determines how to set it up on your own server?
DigitalOcean > Ubuntu + VestaCP (nginx+php-fpm).
Tried in digitalocean > lemp, same thing.
What and where should be configured?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sanes, 2019-03-21
@avprinciple

php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f [email protected]

M
Mysterion, 2019-03-22
@Mysterion

In all apache templates or in the one that is used, add:

<Directory %docroot%>
...
php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -f [email protected]%domain_idn%"
</Directory>

Save and after that in console:
v-rebuild-web-domains

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question