Answers for "php mail test if working"

PHP
4

check mail php

filter_var($email, FILTER_VALIDATE_EMAIL)
Posted by: Guest on March-07-2020
0

php test if mail is working

<?php 
$email = "[email protected]";
$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
?>
Posted by: Guest on November-24-2020

Browse Popular Code Answers by Language