Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #54465, comment 1


Ignore:
Timestamp:
07/12/2025 06:02:54 PM (14 months ago)
Author:
SirLouen

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #54465, comment 1

    initial v1  
    22
    33So basically, here is that this address `nameSurname.@gmail.com` is not valid.
     4
     5[https://github.com/PHPMailer/PHPMailer/blob/0ff2d3c8ead628df2493537d9f91db962aa47718/src/PHPMailer.php#L1638 If you check PHPMailer code] basically its failing to spot a to, a cc or a bcc because [https://github.com/PHPMailer/PHPMailer/blob/0ff2d3c8ead628df2493537d9f91db962aa47718/src/PHPMailer.php#L1105 its unable to find a valid address] with an @ because of that dot,
     6
     7Maybe you could find some help with this little workaround: I was able to bypass this by setting the `wp_mail_from` filter like this:
     8
     9{{{
     10add_filter('wp_mail_from', function($original_email_address) {
     11     return 'wordpress@server.local';
     12});
     13}}}
    414
    515Although using my example code for sending emails:
     
    5464Date: Sat, 12 Jul 2025 17:25:56 +0000
    5565To: nameSurname.@gmail.com
    56 From: WordPress <wordpress@mailhog.local>
     66From: WordPress <wordpress@server.local>
    5767Subject: Subject
    5868Message-ID: <nUcLDNeY6tTDsDB3ReQB88Sfd3pQrxN0QRugoMqqR4@localhost>
     
    6474}}}
    6575
    66 The email, although, is being delivered with `wp_mail` despite not being compliant.
     76The email, although, is being delivered with `wp_mail` despite not being compliant. So I don't recommend you using an email like such
    6777
    6878Closing this for being `invalid` for not compliant with the RFC.