1<?php
2$email = "youremail@gmail.com";
3$subject = "Email Test";
4$message = "my mail test message";
5$sendMail = mail($email, $subject, $message);
6if($sendMail){
7 echo "Email Sent Successfully";
8}else{
9 echo "Mail Failed";
10}
11#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
12?>
13