I am trying to process returned emails in phplist using gmail email address as return return address. When I tried to handle the bounces, I ended up in a similar scenario, as mentioned in this "Mail". There are 250 failures to process .
Phplist was able to receive only 250 emails from my gmail account. As I studied the phplists code further, I came across this line of code that seems guilty.
$num = imap_num_msg($link);// get only the number 250
Skip more details. I wrote a few lines of code to get a mail account using imapand pop. The pop version returns the wrong score, while the imap version is correct.
$username = 'bounceemail@mydomain.com';
$password = 'password';
$hostname = '{imap.gmail.com:993/imap/ssl}INBOX';
$inbox = imap_open($hostname,$username,$password);
$num = imap_num_msg($inbox);
echo $num;
$hostname = '{pop.gmail.com:995/pop3/ssl}INBOX';
$inbox = imap_open($hostname,$username,$password);
$num = imap_num_msg($inbox);
echo $num;
I really need to know why the counts are different for the same email with different protocols. In addition, all the help I found on the Internet related to phplist failure handling explicitly asks for the use of the version {pop.gmail.com:995/pop3/ssl}INBOX. Therefore, I cannot risk using a different version for failover.
source
share