mysql - Read email imap php -
i using php - codeigniter (peeker library) back-end , using imap fetch emails multiple email addresses.
we have complex search criteria query against imap folder, increase performance of script search on new emails , storing mailbox name,unique id (unique in mailbox), header information in mysql table.
i came 2 problems :
- how can keep track on
deleted / moveditems ? - is there way determine attachment exists or not ? ( because header information doesn't give clue attachment indicator , tried use
imap_fetchstructurereads entire message including attachment takes long time process )
note :
i running script on end regular interval ( not cron job, external application initialize script on regular interval ).additionally doing these php on limitations.
please me.
thanks
first of all, in imap, there no requirement imply fetch bodystructure have transfer complete message data attachments. either assumption wrong, or imap library has grave bug, or using wrong function here.
second, mentioned keeping track of uids have not said uidvalidity. read rfc 3501 understand means. there no way implement application talking imap correctly without knowing protocol. further pointers given in rfc 4549.
your third question asking deleted or moved items. in baseline imap, cannot that. way know messages have been deleted , new arrivals track uids explicitly -- assuming uidvalidity given , did not change, compare list of uids since last time got now, , see new , gone. again, read rfcs, contain answers of questions suggestions on how optimize synchronization process. there's thesis imap goes more detail on how further improve protocol chat , extensions relevant. not easy project, though.
Comments
Post a Comment