WordPress.org

Make WordPress Core

Opened 9 years ago

Closed 7 years ago

#1480 closed defect (bug) (wontfix)

wp-mail reset()

Reported by: skippy Owned by: skippy
Milestone: Priority: low
Severity: minor Version: 1.6
Component: Administration Keywords: wp-mail bg|needs-patch bg|2nd-opinion
Focuses: Cc:

Description

This thread states that no messages are being deleted. wp-mail tries to delete messages with this:

if(!$pop3->delete($i)) {
    echo '<p>Oops '.$pop3->ERROR.'</p></div>';
    $pop3->reset();
    exit;

Unfortunately, /wp-includes/class-pop3.php says this about the reset() function:

function reset () {
    //  Resets the status of the remote server. This includes
    //  resetting the status of ALL msgs to not be deleted.
    //  This method automatically closes the connection to the server.

Since wp-mail calls reset() inside a loop, it will <strong>unflag</strong> any messages previously marked for deletion and immediately disconnect.

I propose we set an error variable inside the wp-mail loop, rather than reset(), when deletion fails and then deal with it gracefully in a clean-up process at the end.

Change History (5)

comment:1 skippy9 years ago

  • Status changed from new to assigned

comment:2 markjaquith9 years ago

If one delete fails, isn't it probable that the others will fail too? (not hypothetical... I'm asking!)

comment:3 skippy9 years ago

I haven't used POP3 in ages, so I honestly don't know either. It seems premature, though, to abort outright on a failed delete.

comment:4 davidhouse8 years ago

If the delete fails, what can we do? You mentioned a clean-up process, what would this do? I suggest we just remove the reset call, but keep the error.

comment:5 foolswisdom7 years ago

  • Resolution set to wontfix
  • Status changed from assigned to closed

Closing as WONTFIX for now, its been stale for a year... and the problems of the thread mentioned in the description seem to be attributed to other causes.

Note: See TracTickets for help on using tickets.