0

I am using PHPMailer on GoDaddy to send the email from the GSuite domain email. I did all the configurations according to the Google docs and verified the google._domainkey also,

    $mail->IsSMTP();
    $mail->CharSet = "UTF-8";
    $mail->SMTPDebug = 1;
    $mail->Debugoutput = 'html';
    $mail->SMTPAuth = false;
    $mail->SMTPSecure = 'None';
    $mail->Host = "localhost";
    $mail->Port = 25;
    $mail->Username = "sender@sender.com";
    $mail->Password = "********";
    $mail->priority = 1;
    $mail->addCustomHeader("X-MSMail-Priority: High");
    $mail->addCustomHeader("Importance: High");
    $mail->addCustomHeader("List-Unsubscribe","<sender@sender.com>");
    $mail->addCustomHeader("X-MimeOLE:","Powered by Something.");
    $mail->Sender = "sender@sender.com";
    $mail->setFrom('sender@sender.com','SENDER NAME');
    $mail->addAddress('hello@hello.com','Person');
    $mail->Subject = "The subject";
    $mail->msgHTML("My email body.");
    $mail->IsHTML(true);
    $mail->SMTPOptions = array(
        'ssl' => array(
        'verify_peer' => false,
        'verify_peer_name' => false,
        'allow_self_signed' => true
        )
    );

And tested my configurations with the toolbox.googleapps.com which show everything is fine.

✅ Effective SPF Address Ranges.

✅ Domain should have at least 2 NS servers.

✅ Naked domain must be an A record (not CNAME).

✅ Every name server must reply with exactly the same TXT DKIM records.

✅ Every name server must reply with exactly the same TXT DMARC records.

✅ Every name server must reply with exactly the same CNAME records.

✅ Every name server must reply with exactly the same NS records.

✅ Every name server must reply with exactly the same MX records.

✅ Every name server must reply with exactly the same TXT records.

✅ DKIM authentication DNS setup.

✅ Formatting of DMARC policies.

✅ SPF must allow Google servers to send mail on behalf of your domain.

✅ MX lookup must fit in one UDP response packet.

✅ TXT lookup should fit in one UDP response packet.

But when I send the email from PHPMailer and receive, it shows question mark (?) on the profile image and in the show original it says:

SPF: SOFTFAIL with IP ********. DMARC: 'FAIL'.

And also getting a gray warning which says:

Be careful with this message The sender hasn't authenticated this message so Gmail can't verify that it actually came from them.

I tried all Google & Stack-Overflow solutions but still no luck.

  • Alas, another GoDaddy victim... I don't know why you are disabling certificate verification; GoDaddy should not be offering TLS on localhost. If they have really misconfigured it, set `$mail->SMTPAutoTLS = false`, and `SMTPDebug = 2` to see what the server is saying. It would not surprise me if google won't allow sending from other IPs if you are using them for handling your MX. It would help if you posted the headers from a message received in gmail. – Synchro Feb 05 '23 at 11:48

0 Answers0