Emails accepted for sending but not delivered

Hello,

Not a very original subject!

I have a shared hosting plan with an MX record.

And again, my emails are being blocked for supposedly 40 spam emails!

Note that these are "technical" emails that I send to myself using PHP's mail() function.

That said, the email status is not "Spam" but still "Active", and I don't see anything about potential spams.

Also, when I logged into my OVH dashboard I got a message saying I should no longer use PHP's mail() function, but PHPMailer (for example) to use authentication.

Fine.

So I installed PHPMailer and started doing a few tests with authentication.

PHPMailer logs clearly show that authentication succeeds, that my email is accepted... but the recipient never receives anything!

Here is the PHPMailer log:

2026-08-30 08:54:14 SERVER -> CLIENT: 220 GARM-106R006 Sunday, August 30, 2026
2026-08-30 08:54:14 CLIENT -> SERVER: EHLO ``www.minipavi.fr``` 2026-08-30 08:54:14 SERVER -> CLIENT: 250-OVH SMTP PROXY Hello250-SIZE 104857600250-ENHANCEDSTATUSCODES250-AUTH LOGIN PLAIN250-AUTH=LOGIN PLAIN250 8BITMIME 2026-08-30 08:54:14 CLIENT -> SERVER: AUTH LOGIN 2026-08-30 08:54:14 SERVER -> CLIENT: 334 VXNlcm5hbWU6 2026-08-30 08:54:14 CLIENT -> SERVER: [credentials hidden] 2026-08-30 08:54:14 SERVER -> CLIENT: 334 UGFzc3dvcmQ6 2026-08-30 08:54:14 CLIENT -> SERVER: [credentials hidden] 2026-08-30 08:54:14 SERVER -> CLIENT: 235 2.7.0 Authentication successful 2026-08-30 08:54:14 CLIENT -> SERVER: MAIL FROM:<contact@minipavi.fr> 2026-08-30 08:54:15 SERVER -> CLIENT: 250 2.1.0 Ok 2026-08-30 08:54:15 CLIENT -> SERVER: RCPT TO:<ludojoey@free.fr> 2026-08-30 08:54:15 SERVER -> CLIENT: 250 2.1.5 Ok 2026-08-30 08:54:15 CLIENT -> SERVER: DATA 2026-08-30 08:54:15 SERVER -> CLIENT: 354 OK 2026-08-30 08:54:15 CLIENT -> SERVER: Date: Sun, 30 Aug 2026 10:54:14 +0200 2026-08-30 08:54:15 CLIENT -> SERVER: To: Recipient Name <ludojoey@free.fr> 2026-08-30 08:54:15 CLIENT -> SERVER: From: My Website <contact@minipavi.fr> 2026-08-30 08:54:15 CLIENT -> SERVER: Reply-To: My Website <contact@minipavi.fr> 2026-08-30 08:54:15 CLIENT -> SERVER: Subject: Test d envoi email 2026-08-30 08:54:15 CLIENT -> SERVER: Message-ID: <ShKr2oOOSbmhFdCwpSEIP4QNJTVH53ZjdZV220DlDU@www.minipavi.fr> 2026-08-30 08:54:15 CLIENT -> SERVER: X-Mailer: PHPMailer 7.1.1 (https://github.com/PHPMailer/PHPMailer) 2026-08-30 08:54:15 CLIENT -> SERVER: MIME-Version: 1.0 2026-08-30 08:54:15 CLIENT -> SERVER: Content-Type: multipart/alternative; 2026-08-30 08:54:15 CLIENT -> SERVER: boundary="b1=_ShKr2oOOSbmhFdCwpSEIP4QNJTVH53ZjdZV220DlDU"
2026-08-30 08:54:15 CLIENT -> SERVER: Content-Transfer-Encoding: 8bit
2026-08-30 08:54:15 CLIENT -> SERVER:
2026-08-30 08:54:15 CLIENT -> SERVER: --b1=_ShKr2oOOSbmhFdCwpSEIP4QNJTVH53ZjdZV220DlDU
2026-08-30 08:54:15 CLIENT -> SERVER: Content-Type: text/plain; charset=us-ascii
2026-08-30 08:54:15 CLIENT -> SERVER:
2026-08-30 08:54:15 CLIENT -> SERVER: Ceci est un text ! Email body in plain text (fallback)
2026-08-30 08:54:15 CLIENT -> SERVER:
2026-08-30 08:54:15 CLIENT -> SERVER: --b1=_ShKr2oOOSbmhFdCwpSEIP4QNJTVH53ZjdZV220DlDU
2026-08-30 08:54:15 CLIENT -> SERVER: Content-Type: text/html; charset=us-ascii
2026-08-30 08:54:15 CLIENT -> SERVER:
2026-08-30 08:54:15 CLIENT -> SERVER: Ceci est un text ! Email body in <b>HTML</b>
2026-08-30 08:54:15 CLIENT -> SERVER:
2026-08-30 08:54:15 CLIENT -> SERVER:
2026-08-30 08:54:15 CLIENT -> SERVER: --b1=_ShKr2oOOSbmhFdCwpSEIP4QNJTVH53ZjdZV220DlDU--
2026-08-30 08:54:15 CLIENT -> SERVER:
2026-08-30 08:54:15 CLIENT -> SERVER: .
2026-08-30 08:54:15 SERVER -> CLIENT: 250 2.0.0 Ok: 1279 bytes queued as 0AA6E100190
2026-08-30 08:54:15 CLIENT -> SERVER: QUIT
2026-08-30 08:54:15 SERVER -> CLIENT: 221 ``minipavi.fr`` Service closing transmission channel
Email sent successfully.

Regardless of the recipient address, the email never arrives.

The domain has an SPF record:

image

If anyone has an idea of what the problem is, it would be welcome...

These email‑sending issues are exhausting...

Thank you!

Hi @Jean_arthurS

In your logs I see that the server accepts the email and queues it, but the recipient never receives it. This usually happens when the From: field of the email does not match the authenticated SMTP account. This field must always be an email address that belongs to your domain and that is created in your OVHcloud email service.

Make sure that the SPF and DKIM records of your domain are correctly configured. It’s a good practice to ensure deliverability.

To verify that the SMTP connection is correct, you can enable PHPMailer’s debug mode with $mail->SMTPDebug = 2; to see the full exchange between your script and the OVH server.

Let us know, cheers!
Sergio Turpín

Thank you for your response.

1/ I confirm that the From: field indeed corresponds to the identified email account

2/ The logs I included in my message are precisely the output from SMTPdebug=2

3/ I added the DKIM yesterday (after having already posted my message).

4/ My SPF seems valid (that's what OVH provides):

image

That said, I just made a new test and, oh miracle, it works!

Something must have been unlocked at OVH..

Well, I hope I won’t be bothered by this anymore: I have an SPF record, DKIM and I added DMARC this morning! According to "mai-tester(.)com" my emails have a rating of 10/10!

I'm very glad that it has been resolved :wink:

Kind regards,
Sergio Turpín