我的电子邮件被标记为垃圾邮件。我怎样才能防止这种情况?这是我发送它们的方式:
public function sendMail($to,$subject,$from,$headers)
{
$headers .= "From: ".$from. "<support@mydomain.com>";
$headers .= "MIME-Version: 1.0" . "\r\n";
$headers .= "Content-type: text/html; charset=ISO-8859-1\r\n";
$headers .= "X-Priority: 3\r\n";
$headers .= "X-Mailer: smail-PHP ".phpversion()."\r\n";
$message .= $this->getMessage();
return mail($to,$subject,$message,$headers);
}