[Dovecot] Fetch without setting flags
Hello,
I'm customizing squirrelmail and I want to print a line from the message in front of the subject in mailbox listing (like gmail). the problem is, when I use 'FETCH {SOME_ID} BODY[]' the message gets marked as seen. How can I fetch without setting the senn flag ?
Thanks Behrooz
Try using 'EXAMINE' rather than 'SELECT' when selecting the Mailbox - that should do it.
Adrian Mardlin in charge @ The Very Good Email Company t 01442 892641 m 07920 102401 f 01442 808081 w www.verygoodemail.com
On 21 Dec 2010, at 12:26, Behrooz Afghahi wrote:
Hello,
I'm customizing squirrelmail and I want to print a line from the message in front of the subject in mailbox listing (like gmail). the problem is, when I use 'FETCH {SOME_ID} BODY[]' the message gets marked as seen. How can I fetch without setting the senn flag ?
Thanks Behrooz
The content of this email and any attachment is private and may be legally privileged. If you are not the intended recipient, any use, disclosure, copying or forwarding of this email and/or its attachments is unauthorised. If you have received this email in error please notify the sender by email and delete this message and any attachments immediately from this system.
The Very Good Email Company is a trading style of APM Internet Limited. APM Internet Limited is a limited company incorporated in England and Wales with registration number 04601087 and whose registered office is at Charter Court, Midland Road, Hemel Hempstead, Hertfordshire HP2 5GE
On Tue, 2010-12-21 at 15:56 +0330, Behrooz Afghahi wrote:
Hello,
I'm customizing squirrelmail and I want to print a line from the message in front of the subject in mailbox listing (like gmail). the problem is, when I use 'FETCH {SOME_ID} BODY[]' the message gets marked as seen. How can I fetch without setting the senn flag ?
Get first 100 characters from the message body / first mime part:
FETCH n BODY.PEEK[1]<0.100>
This of course hopes that [1] MIME part contains something usable. You should probably also fetch BODY.PEEK[1.MIME] to see what it contains. (Interestingly enough Dovecot happens to return message headers as 1.MIME when there are no MIME parts, but this won't work for other servers.)
participants (3)
-
Adrian Mardlin
-
Behrooz Afghahi
-
Timo Sirainen