I am Unable to send mails. i would like to know what i am doing wrong or how to connect to smtp.
Here is my code which i am using for sending emails.
Am i missing something
$to='pratik.purohit@steeplap.com';
$subject='Hey';
$body='
This is a test email
';
$headers='From: pratik.purohit@steeplap.com';
if(mail($to, $subject, $body, $headers)){
echo 'mail send '.$to;
}
else{
echo "mail not send";
}