Make WordPress Core

Opened 19 years ago

Closed 17 years ago

#1480 closed defect (bug) (wontfix)

wp-mail reset()

Reported by: skippy's profile skippy Owned by: skippy's profile 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)

#1 @skippy
19 years ago

  • Status changed from new to assigned

#2 @markjaquith
19 years ago

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

#3 @skippy
19 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.

#4 @davidhouse
18 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.

#5 @foolswisdom
17 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.