0

I'm creating a PHP application to save in my database all the email messages from an email account.

When I connect to a gmail account and use the imap_list() function, I get these boxes:

 array {
[0]=> "{imap.gmail.com:993/ssl}INBOX"
[1]=> "{imap.gmail.com:993/ssl}[Gmail]/Caixote do Lixo"
[2]=> "{imap.gmail.com:993/ssl}[Gmail]/Com estrela"
[3]=> "{imap.gmail.com:993/ssl}[Gmail]/Correio enviado"
[4]=> "{imap.gmail.com:993/ssl}[Gmail]/Importante"
[5]=> "{imap.gmail.com:993/ssl}[Gmail]/Rascunhos"
[6]=> "{imap.gmail.com:993/ssl}[Gmail]/Spam"
[7]=> "{imap.gmail.com:993/ssl}[Gmail]/Todo o correio" }

These boxes are in Portuguese. When I connect to a different account, the boxes have English names. This mean I have no means to know which one of the boxes is the Trash box, or Sent box, for example.

Is there a way to identify each box correctly?

4

2 回答 2

0

这个问题有点棘手。我通过使用套接字连接而不是使用 PHP 本机 imap 函数连接到 imap 客户端来解决这个问题。这样我就得到了我需要的特殊用途属性。

于 2015-03-09T17:04:38.740 回答
0

也许您应该检查每个文件夹中的邮件数量?通常工作垃圾箱或已发送框包含消息。

于 2015-03-05T12:39:36.063 回答