Hello,
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
162.243.11.116 rioth.maindomain.me maindomain
162.243.11.116 mail.anotherdomain.com mail
162.243.11.116 mail.otherdomain.co mail
Regards,
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
There are a couple ways to accomplish this in sendmail but as you are not using sendmail as part of a fully fledged email server and only to send emails from your web scripts the following should do the trick:
<VirtualHost *:80>
Standard stuff goes here
<Directory /dir/to/your/web/root>
php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -fuser@domain2.com"
</Directory>
</VirtualHost>
Adding this directive to your virtualhosts should set the default sender for the emails sent by your php scripts. In this case it is setting the sender to user@domain2.com for this virtualhost.
Be sure to restart apache after updating your configuration so the change can take effect.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.