i know there is already others question why mail goes to spam. But all answer i see is they need to authentication their domain first.
If we login to webmail in our domain and sent email directly from there, then it goes to inbox of the receiver. But when we sent the email from third-party application such as php mailer. it will be sent into the spam.
we have authentication our domain using mailchimp but our email still goes to the spam. there is an simple example of phpmailer setting we use.
<?php
// Import PHPMailer classes into the global namespace
// These must be at the top of your script, not inside a function
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\Exception;
//Load composer's autoloader
require 'src/Exception.php';
require 'src/PHPMailer.php';
require 'src/SMTP.php';
$mail = new PHPMailer(true); // Passing `true` enables exceptions
try {
//Server settings
$mail->SMTPDebug = 2;
$mail->ismail();
$mail->Host = 'localhost'; // Specify main and backup SMTP servers
//Recipients
$mail->setFrom('info@homecentra.com');
$mail->addAddress('receiver.homecentra@gmail.com'); // Add a recipient
//Content
$mail->isHTML(true); // Set email format to HTML
$mail->Subject = 'Here is the subject';
$mail->Body = 'This is the HTML message body <b>in bold!</b>';
$mail->AltBody = 'This is the body in plain text for non-HTML mail clients';
$mail->send();
echo 'Message has been sent';
} catch (Exception $e) {
echo 'Message could not be sent.';
echo 'Mailer Error: ' . $mail->ErrorInfo;
}
Oh just for information, the email goes to spam only to Gmail user, if it sent to Yahoo or other email provider it wil still sent to inbox. And our email goes to spam only just recently, before we use the same thing even without authentication to mailchimp and it will goes to the inbox. We hope you can give us a solution
here the prove our domain already verified enter image description here