I am trying to use php mail() function on my new web server(linux based server) for my website. The issue is, emails are not sending to domain email addresses like some1@domain.com but its working fine for gmail, yahoo. I don't know what is the issue on it?. please give me suggestions or advice how to solve this issue. I want to send emails to domain-based email addresses.
my code is
//$to = $_POST['femail'];
$to = "<toadd@domain.com>";
$message = "
<html>
<head>
<title>".$subject."</title>
</head>
<body>
<p>Registration request from site</p>
<table>
<tr>
<td>Project Requested</td>
<td>".$project."</td>
</tr>
</table>
</body>
</html>";
// Always set content-type when sending HTML email
$headers = "MIME-Version: 1.0" . "\r\n";
$headers .= "Content-type:text/html;charset=UTF-8" . "\r\n";
// More headers
$headers .= 'From: <info@domain.com>' . "\r\n";
$headers .= 'Cc: <some@domain.com>' . "\r\n";
$headers .= 'X-Mailer: PHP/' .PHP_VERSION. "\r\n";
@mail($to,$subject,$message,$headers);