One thing I noticed was my messages weren't deleted, even when DeleteMessage() was called. The message is marked as eligible for deleting, but when the close() function is called, $this->must_update was never set to 1. I removed the line $pop3->must_update=1; and moved it to my script, in the form of $pop3->must_update=1; so that the instance variable would be correctly processed in the close() function.
Perhaps the use of instanceof operator would be more appropriate. I don't know how to use it, though.
Manuel Lemos - 2006-01-03 04:05:14 - In reply to message 1 from Tony
That is because there is a call to the ResetDeletedMessages() function in the script. If you do not call that function, all messages scheduled to be deleted will be removed when the QUIT command is executed before disconnecting.
Tony - 2006-01-06 20:11:49 - In reply to message 5 from Manuel Lemos
Here is the debug output for the script without the explicit setting
$pop3->must_update = 1;
After the script was run, the message was still not deleted.
Once I explicitly set the class variable I re-ran the script. This time the message was deleted, as expected.
Connecting to mail.lightning-mortgage.com ...
S +OK <email@example.com>
C USER firstname.lastname@example.org
C PASS pr
S +OK 1 3227
S 1 3227
C RETR 1
S Return-Path: <>
S Delivered-To: lightnin-EmailCampaigns@lightning-mortgage.com
S Received: (qmail 45137 invoked from network); 6 Jan 2006 20:01:04 -0000
S Received: from unknown (HELO smtp101.sbc.mail.mud.yahoo.com) (184.108.40.206)
S by host373.ipowerweb.com with SMTP; 6 Jan 2006 20:01:04 -0000
S Received: (qmail 35331 invoked for bounce); 6 Jan 2006 19:59:08 -0000
S DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws;
S s=s1024; d=yahoo.com;
S b=zpCge92ytgTf4TCgWCbSmXm+vIWN7fvLQ7Z8smIjklWCipsjGgjCq27SEomeAQkbqVsE3D47jXpNDAb39U/nQfEp/dLO4NgH09bN2X4w7Fdr3F8Q7e+U32Q8nSmiX63QpP/jq1x0JJsaX4T3SUVdkcGkuUpeGLGgft+Z3JzwryM= ;
S Date: 6 Jan 2006 19:59:08 -0000
S From: MAILER-DAEMON@yahoo.com
S To: EmailCampaigns@lightning-mortgage.com
S Subject: failure notice
S Hi. This is the qmail-send program at yahoo.com.
S I'm afraid I wasn't able to deliver your message to the following addresses.
S This is a permanent error; I've given up. Sorry it didn't work out.
S 220.127.116.11 failed after I sent the message.
S Remote host said: 554 delivery error: dd This user doesn't have a yahoo.com account (email@example.com)  - mta220.mail.re2.yahoo.com
S --- Below this line is a copy of the message.
S Return-Path: <EmailCampaigns@lightning-mortgage.com>
S Received: (qmail 35315 invoked from network); 6 Jan 2006 19:59:08 -0000
S Received: from unknown (HELO lightning-mortgage.com) (firstname.lastname@example.org@18.104.22.168 with login)
S by smtp101.sbc.mail.mud.yahoo.com with SMTP; 6 Jan 2006 19:59:07 -0000
S Date: Fri, 6 Jan 2006 12:01:02 -0800
S Return-Path: EmailCampaigns@lightning-mortgage.com
S To: Friend <email@example.com>
S From: Anthony Ferlazzo <EmailCampaigns@lightning-mortgage.com>
S Reply-to: firstname.lastname@example.org
S Subject: Thanks for Signing Up, Friend
S Message-ID: <email@example.com>
S X-Priority: 3
S X-Mailer: PHPMailer [version 1.73]
S MIME-Version: 1.0
S Content-Transfer-Encoding: 8bit
S Content-Type: text/plain; charset="iso-8859-1"
S Hi Friend,
S Looking forward to hearing from you,
C DELE 1
Manuel Lemos - 2006-01-08 19:20:49 - In reply to message 6 from Tony
I think there is something wrong in your script. Could you be passing the pop3 class object to a function by value, delete the message there, and then close the connection after returning from the class?
Other than that possibility, it may also be related with some of the latest PHP versions bugs. What version are you using?
Tony - 2006-01-08 20:50:08 - In reply to message 7 from Manuel Lemos
As I already said, I am running PHP 4.3.11.
As far as a bug in the script, the script supplied with the class results in the same outcome. If you aren't experiencing the problem on your end then it may be the version of php supplied by my host provider.