php test if mail is working
snippet in php

check mail php

user1972

filter_var($email, FILTER_VALIDATE_EMAIL)

php test if mail is working

user1810

<?php 
$email = "youremail@gmail.com";
$subject =  "Email Test";
$message = "my mail test message";
$sendMail = mail($email, $subject, $message);
if($sendMail){ 
	echo "Email Sent Successfully";
}else{
	echo "Mail Failed";
}
#If the mail() function exist but mails not going, check if a mail transport agent (MTA)such as sendmail or postfix is installed on your server
?>