Introduction
In some cases, you might want to verify that mail() works on your server.
Procedure
To confirm that PHP Mail() works, you could create a PHP file with the following contents, making sure to replace the destination email address names as necessary.
<?php
$dest = "destination@domain.tld";
$fromaddy = "cpaneluser@domain.tld";
mail("<$dest>","Test from php mail","Test","From:<$fromaddy>","-f$fromaddy");
?>
From there, open the file in a web browser top send the message.
For more information, please see the documentation from php.net: https://www.php.net/manual/en/function.mail.php
Comments
0 comments
Article is closed for comments.