Currently, there are 0 users and 1 guest visiting this topic.

Tags:

Author
Topic
#65810

We had a problem with the mail queue, which made it impossible to empty the queue. When running the cronjob manually from the console we realized that the problem happened in “/wp-includes/PHPMailer/PHPMailer.php” line 1144 of WordPress 5.5.3.

  if (!static::validateAddress($address)) {
    $error_message = sprintf(
      '%s (%s): %s',
      $this->lang('invalid_address'),
      $kind,
      $address
    );
    $this->setError($error_message);
    $this->edebug($error_message);
    if ($this->exceptions) {
      throw new Exception($error_message); // Line 1144
    }

    return false;
  }

The email address came from a spam attack on an unprotected form and the email looked something like “ab.us.e.in<<some more dots and text that I can’t remember>>@gmail.com” and every time the plugin attempted to send the queued email it failed at this email address and the queue was never emptied.

Since such an email address could also be entered by a real user either by accident or perhaps that is their email address, then it would block the entire queue forever.

Could you catch this exception thrown and report it as an error sending instead? The only workaround we could think of was to temporarily comment out line 1144 in the production code to allow all emails to be sent without the validation of the email address. Afterwards we re-added line 1144 and the queue is now empty and everything is back to running normally.

Topic Information
Bug Report
7.2
5.5.3
3.9
Viewing 1 replies (of 1 total)
Author
Replies
  • #65812

    Thanks for reporting this. I will check this out, and add some way to handle it.

    Regards,
    Milan

    Dev4Press - Premium plugins for WordPress.

    1 user thanked author for this post.
Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.
Register

If you don't have an account on this website, you can register for a free account here:

Register