Steps to verify that PHP mail() working or not

kumkumsharma

Administrator
Staff member
If you are not sure about your PHP mail() working or not on your server then you can manually check it with coding. You can upload simple code and can check at your end.

You just have to upload below code in your PHP file and then you can check, you are getting mail or not.

Code:
<?php
$dest = "destination@domain.com";
$fromuser = "user@domain.com";
mail("<$dest>","Test from php mail","Test","From:<$fromuser>","-f$fromuser");
?>
Here you have to use your email address.
 
Top