How I set the php mail function for multiple domains correctly?
Sometime ago I install the mail (php function), but when I tried to send the email by any HTML form the response was too slow. I solved the problem editting the /etc/hosts file with a correct FQDN.
I am using multiple domains (Virtual Host), and this week when I was installing another site I checked that the mails is sending slow again. How can i fix it again?
My /etc/hosts are:
127.0.0.1 localhost.localdomain localhost
127.0.1.1 rioth.maindomain.me maindomain
18.104.22.168 rioth.maindomain.me maindomain
22.214.171.124 mail.anotherdomain.com mail
126.96.36.199 mail.otherdomain.co mail
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.