Opened 19 years ago
Closed 17 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)
#3
@
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.
Note: See
TracTickets for help on using
tickets.
If one delete fails, isn't it probable that the others will fail too? (not hypothetical... I'm asking!)