I am using php mail() function to send emails. But it is not able to send mails to certain domain. For example it goes to email ids with @gmail.com but it is not going to emails @eduraft.com Hers is the code which I have used. ( I am using wordpress and I am facing the same problem with wp_mail).
$to = '[email protected]';
$subject = 'Admission Alert';
$message = 'Admission Alert';
$headers = 'From: [email protected]' . "\r\n" .
'Reply-To: [email protected]' . "\r\n" .
'X-Mailer: PHP/' . phpversion();
mail($to, $subject, $message, $headers);
even i used "[email protected]" but it is not working. Whereas if I send the mail to [email protected] it works.