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);

更多相关文章

  1. TextView在单击时发送电子邮件
  2. ********** javamaill邮箱发送问题 ******************
  3. javascript小例子--实现邮箱验证的功能
  4. ***100分,谁有用java mail做的把表单直接发送到邮箱的网页例子,发

随机推荐

  1. c语言求阶乘
  2. c语言实现输入圆的半径计算圆的面积
  3. 字符串处理函数是什么
  4. c语言计算1~n的阶乘之和
  5. c语言如何求三角形的面积
  6. c语言中x++和++x有什么区别
  7. c语言中while与do while循环的主要区别是
  8. c语言实现删除字符串中的数字字符
  9. c语言如何判断整数是几位数
  10. getchar()的功能是什么