0

Im in the meddle of creating a web app that downloads all the emails using imap library in php but im troubled on which id should i used, This is a sample email header retrieve from a gmail account.

Array
(
[0] => stdClass Object
    (
        [subject] => test subject
        [from] => someone
        [to] => enquire@xxxx.com
        [date] => 17 Jun 2016 10:33:13 +0900
        [message_id] => <08a32A30-C6n7-4A4A-AE91-C35429AF48BA@x2mail.xxxx.com>
        [size] => 8460
        [uid] => 8645
        [msgno] => 8522
        [recent] => 0
        [flagged] => 0
        [answered] => 0
        [deleted] => 0
        [seen] => 0
        [draft] => 0
        [udate] => 1466127256
    )

) 

as you can see above there is a "uid" and "msgno" which should i use?

1 Answers1

0

http://php.net/manual/en/function.imap-uid.php

Here I read: An UID is a unique identifier that will not change over time while a message sequence number may change whenever the content of the mailbox changes.

So, "uid" would probably be better.

KIKO Software
  • 15,283
  • 3
  • 18
  • 33