[wp-trac] [WordPress Trac] #52504: wp_mail() not able to send/deliver emails to domain with hyphens in it?

WordPress Trac noreply at wordpress.org
Wed Aug 6 15:04:32 UTC 2025


#52504: wp_mail() not able to send/deliver emails to domain with hyphens in it?
--------------------------+-------------------------
 Reporter:  verya.ca      |       Owner:  (none)
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:
Component:  Mail          |     Version:  5.7
 Severity:  normal        |  Resolution:  worksforme
 Keywords:                |     Focuses:
--------------------------+-------------------------
Changes (by SirLouen):

 * status:  reopened => closed
 * resolution:   => worksforme


Comment:

 == Reproduction Report
 === Description
 ❌ This report can't validate that the issue can be reproduced.

 === Environment
 - WordPress: 6.9-alpha-60093-src
 - PHP: 8.2.29
 - Server: nginx/1.29.0
 - Database: mysqli (Server: 8.4.6 / Client: mysqlnd 8.2.29)
 - Browser: Chrome 138.0.0.0
 - OS: Windows 10/11
 - Theme: Twenty Twenty-Five 1.3
 - MU Plugins: None activated
 - Plugins:
   * Testing Dolly
   * Test Reports 1.2.0

 === Testing Instructions
 1. Simply send an email to a domain with hyphens (`-`) as reported.
 2. 👌 Email is sent and delivered as expected.

 === Actual Results
 1. ❌ Error condition is not occurring.

 === Additional Notes

 - As @davidbaumwald did already observe, there is no element that hinders
 hyphens by default.
 - Below I attach a raw message sent from a domain with hyphens and to a
 domain with hypens
 - @veryaca before reopening this report, please provide exact reproduction
 instructions, more environment information, what you are using, what email
 server, etc. Some debug logs will be very useful (enable `WP_DEBUG_LOG`
 and `WP_DEBUG_DISPLAY`), also email server logs will help a lot.
 Unfortunatelly, just saying that "it doesn't work" is not enough to help
 you.
 - Closing this again, but as `worksforme`.

 === Supplemental Artifacts
 {{{
 Return-Path: <supertester at example-test-2.org>
 Received: from localhost (unknown [172.20.0.1])
         by 144d19eeeff3 (Mailpit) with SMTP
         for <you at example-test-1.org>; Wed, 6 Aug 2025 14:57:27 +0000 (UTC)
 Date: Wed, 6 Aug 2025 14:57:27 +0000
 To: you at example-test-1.org
 From: WordPress <supertester at example-test-2.org>
 Subject: Baseline test
 Message-ID: <hBCTzYc7C58VJlAhwnM5iV0lG5lprP6TjepNuDCldo at localhost>
 X-Mailer: PHPMailer 6.9.3 (https://github.com/PHPMailer/PHPMailer)
 MIME-Version: 1.0
 Content-Type: text/plain; charset=UTF-8

 See attachments.
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/52504#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list