There are several possible reasons.
Let’s start by checking if the mail protocol is enabled in PHP on your server. If you have access to your server’s php.ini
file, look for SMTP
and smtp_port
. Mine looks like this:
[mail function]
SMTP = localhost
smtp_port = 25
If you don’t have access to the php.ini
file, then create a file called phpinfo.php
in your root directory and add this line to it:
<?php phpinfo(); ?>
View this in your browser (i.e. https://www.mydomain.com/phpinfo.php) and search the page for SMTP
and smtp_port
. Delete the file when you’re done so as not to expose any configuration details to prying eyes.
(Aside: I like to run this page once, copy the page to my Evernote so I have the details for just such an occasion, then delete the page.)
Or ask your web host tech support if SMTP is enabled in PHP.