How can I configure a server on Apache to send emails using PHP mail ()?
There is an apache server on Ubuntu 14.04 LTS, sendmail and php-mail are installed, the path to sendmail is registered in the php.ini file, but letters on the feedback page via mail () are not sent. What could be the problem?Ubuntu Addison Quinn, Jun 20, 2019
At a minimum, your hostname is incorrectly configured, so the server does not accept your message.
The easiest way would be to put PHPMailer and send emails via smtp of the same rambler.
If you still want your mail server, then you need to register the hostname, as well as configure the PTR and SPF records. Here are links to help you:
https://www.linode.com/docs/ getting-started # settin ...
After that, you can check the sending of mail using the mail-tester.com service by sending an email from console:
echo "This is a test." | mail -s Testing [email protected]Anonymous
Apache has nothing to do with it.
You can try replacing sendmail with exim4 (also provides a compatible sendmail binary). Well, look at the logs, yes.Anonymous
To place the code, please use CodePen or similar tool. Thanks you!