如何在php imap函数中看到看不见的电子邮件
I am trying to make a php application like email client. when i fetch a mailbox with php imap and read a message then i need to set the email flag as read. but i cannot do that. I am trying to make a php application like email client. when i fetch a mailbox with php imap and read a message then i need to set the email flag as read. but i cannot do that.
我正在尝试制作像电子邮件客户端这样的php应用程序。当我用php imap获取邮箱并阅读邮件时,我需要将电子邮件标志设置为已读。但我不能这样做。我正在尝试制作像电子邮件客户端这样的php应用程序。当我用php imap获取邮箱并阅读邮件时,我需要将电子邮件标志设置为已读。但我不能这样做。
here is some simple code that i use to do it.
这是我用来做的一些简单代码。
imap_search($inbox);
imap_delete($inbox,$email_number);
imap_expunge($inbox);
but it will delete the email from mail box. Now i search the good but not get any proper solution.
但它将从邮箱中删除电子邮件。现在我搜索好,但没有得到任何适当的解决方案。
1 个解决方案
#1
1
your code is used for delete the mail from mail box. you can try this
您的代码用于从邮箱中删除邮件。你可以试试这个
imap_search($inbox,'UNSEEN');
imap_setflag_full($inbox, $email_number, "\\Seen \\Flagged", ST_UID);
更多相关文章
- TextView在单击时发送电子邮件
- ********** javamaill邮箱发送问题 ******************
- javascript小例子--实现邮箱验证的功能
- ***100分,谁有用java mail做的把表单直接发送到邮箱的网页例子,发