Make WordPress Core

Opened 4 years ago

Closed 4 months ago

Last modified 4 months ago

#54465 closed enhancement (invalid)

Error message with invalid receipent

Reported by: sanzeeb3's profile sanzeeb3 Owned by:
Milestone: Priority: normal
Severity: normal Version: 5.8
Component: Mail Keywords:
Focuses: Cc:

Description

When sending an email with:

wp_mail( 'nameSurname.@gmail.com', 'Subject', 'Message' );

we get the error message: "You must provide at least one recipient email address".

Though the recipient is invalid, it's provided.

Related to: https://core.trac.wordpress.org/ticket/47467 but it does not seem to be fixed.

Change History (2)

#1 @SirLouen
4 months ago

  • Resolution set to invalid
  • Status changed from new to closed

According to the RFC 5322, section 3.4.1, emails starting and ending with a dot are not permitted (dot-atom format means, atext with dots surrounded with atext only, atext doesn't include dots (More info about types of tokens)

So basically, here is that this address nameSurname.@gmail.com is not valid.

If you check PHPMailer code basically was failing to spot a To, a CC or a BCC because PHPMailer was unable to find such valid address among these fields.

But probably in the latest versions of PHPMailer it should work (although it would be problematic with many clients, as it's not RFC compliant). In fact, I'm going to check this a little further using PHPMailer to see if it's not actually checking for this and report it upstream because it shouldn't. So I don't recommend using an email like such.

Closing this for being invalid for not compliant with the RFC.

Last edited 4 months ago by SirLouen (previous) (diff)

#2 @peterwilsoncc
4 months ago

  • Milestone Awaiting Review deleted
Note: See TracTickets for help on using tickets.