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 = 'abc@eduraft.com';
$subject = 'Admission Alert';
$message = 'Admission Alert';
$headers = 'From: xyz@eduraft.com' . "\r\n" .
'Reply-To: xyz@eduraft.com' . "\r\n" .
'X-Mailer: PHP/' . phpversion();
mail($to, $subject, $message, $headers);
even i used "-fxyz@eduraft.com" but it is not working. Whereas if I send the mail to abc@gmail.com it works.