imap_num_msg未检测到转发的电子邮件

In php imap_num_msg not count how many mails are in inbox if there are forwarded mails. Also imap_headerinfo not display them. I there a method to do that?

If you are having problems reading the headers, perhaps some of your messages are not correctly formatted. That may also explain why other functions, such as imap_num_msgs are not giving the expected answer.

If it is happening with forwarded messages, perhaps whatever is forwarding the messages is trashing the headers in the process. That is much more likely to happen if they are being forwarded by some kind of custom script, than if they are forwarded by a proper mail server.