/    Sign up×
Community /Pin to ProfileBookmark

POP3 and IMAP functions question

OK. So I’m trying to moniter my POP3 inbox w/ PHP and its IMAP finctions.
IMAP seems limited w/ pop3 but for the most part suits my needs.

Question.

E-mails are not uniquely id’ed but rather come as a cuttent list i,i=1..n where n=imap_num_msg($inbox);
I process my messages in reverse so as not to disrupt the current sequencing (i=n;i>0;i–)

Some I delete/forward in the process and as such decrement n and save as last_n.

Later, when I come back, is it safe to assume that any new (since I last ran) e-mails would have a sequence number > last_n?

That is, I do another m=imap_num_msg($inbox); and m > last_n. Can I assume that new messages start at last_n+1 … OR
does the sequence get scrampled where I must process all as potentially new?

Any experts out there that can help?

Thanks.

Greg

to post a comment
PHP

0Be the first to comment 😎

×

Success!

Help @gsb spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...