-1

I send out emails to a number of clients. For some reason all 12 clients that have a *@comcast.net address are having the emails go into their spam folder. I tried contacting comcast but trying to get help from them is like getting water from a rock. Here's the php script I'm using to send emails:

function mailerExpressBlueHostUpdated(array $mailInputs){
   
   require_once '../includes/phpmailer6.6/src/PHPMailer.php';
   require_once '../includes/phpmailer6.6/src/SMTP.php';

   $mail = new PHPMailer();
   $mail->IsMail();   
   $mail->SetFrom('skipper@sailwbob.com');
   $mail->IsHTML(true);

   $mail->addAddress($mailInputs['addAddress']);
   
   $mail->AddEmbeddedImage("../public/img/swb.jpg",      "swb-image");
   $mail->AddEmbeddedImage("../public/img/email-32.png", "swb-email");
   $mail->AddEmbeddedImage("../public/img/phone-32.png", "swb-phone"); 
   
   $body = $mailInputs['body'] ;
   $mail->isHTML(true);
   $mail->Subject = $mailInputs['subject'] ;
   $mail->Body    = $body; 

   if(!$mail->send()) {
       //echo "MAIL NOT SENT";
      return 'Message could not be sent.' . 'Mailer Error: ' . $mail->ErrorInfo;
   }else{
       //echo "sent mail";
      return 'Message has been sent';
   }   

   $mail->ClearAddresses();
}

Here are the warnings I'm getting from dns health check

DMARC   sailwbob.com    DNS DMARC RUA / RUF domains Not valid.
DMARC   sailwbob.com    DMARC Quarantine/Reject policy Not enabled.
SMTP    mail.sailwbob.com.  10.84 seconds - Bad on Transaction time.
SMTP    mail.sailwbob.com.  Reverse DNS does not match SMTP Banner.
DNS     sailwbob.com    SOA Expire Value is out of recommended range.
DNS     sailwbob.com    SOA Refresh Value is out of recommended range.

any guidance greatly appreciated

Synchro
  • 35,538
  • 15
  • 81
  • 104
DCR
  • 14,737
  • 12
  • 52
  • 115
  • 1
    Your script is OK, but your DNS could be much improved. Some of this is covered by [the PHPMailer docs](https://github.com/PHPMailer/PHPMailer/wiki/Improving-delivery-rates,-avoiding-spam-filters), but other things are better handled by [this SPF checker](https://kitterman.com/spf/validate.html) or sites like [MX Toolbox](https://mxtoolbox.com/SuperTool.aspx) that check, and also give reasonable explanations. Because this is more about server config than code, you may be better off asking on serverfault.com – Synchro Jun 22 '22 at 22:28
  • You should read the headers in the delivered emails. That will give you indication as to what’s wrong – Daniel A. White Jun 22 '22 at 22:32

1 Answers1

0

So after extensive work with senior techs at comcast I have the following information:

Comcast has very strong security policies in place to prevent data breaches.  In 
order for emails to not go to spam you need to go to connect.xfinity.com log into 
your comcast account and add a custom filter.  Add the address you want to 
receive emails from and tell it to place those emails in your inbox.

It would be nice to have a solution that doesn't involve a custom filter but that's all I have at this time

DCR
  • 14,737
  • 12
  • 52
  • 115