You might need to add your hostname to /etc/hosts (find the line with 127.0.0.1 and append your hostname):
127.0.0.1 localhost localhost.localdomain your_hostname_here
Try restarting apache:
$> sudo service apache2 restart
Please keep in mind that:
mailreturns success (true) if it transported your mail successfully to the configured MTA. This does not mean, that your MTA actually sent any mail.- modern mail servers might not accept your email, since spam filters (dns lookup, sender verification, ...) might be active and prevent delivery.
You can check sendmails mail queue anytime with the command
$> mailq
manpreet
Best Answer
3 years ago
Recently I installed sendmail in Ubuntu
When I try to send mail using php
email();function to send emailNow when I browse the php site I get sent message but I don't get email (in my official email). Can anybody help?