View Single Post
Posts: 19 | Thanked: 6 times | Joined on Dec 2012
#50
Hi,

I think I have a better way to resolve this issue. I'm working on it but will need help to make it as simple and fast as possible.
Here is the results I've found.

In database there's a table named : Mailstatusflags
This table is used to create mailmessages.status value

that's why you can have values like
Originally Posted by czajniczeq
18496 or 2048 or even 51264
this number is composed with mailstatusflags.bitstatus

The flag were looking for is "incoming" : bitstatus = 1
Statusbit = 8 : "READ"
Statusbit = 12 : "NEW"

18496 = 0100 1000 0100 0000 mean :
1st bit = 0 = not "incoming"
7th bit = 1 = "contentavailable"
12th bit = 1 = "new"
15th bit = 1 = "partialcontentavailable"

2048 = 1000 000 000
12th bit = 1 = "new"

51264 = 0001 0100 1001 000
= repliedall, read, unloadeddata, readreplyrequested
@czajniczeq, I don't think this message should be count as unread !?!

and so on ...

What I'm looking for now is the best way to create a trigger "on before insert" that set 1st bit to 1 (18496 +1, 2048+1) when message is new : 12th bit = 1

I think this will resolve for a long time and in a reliable way this little bug !

regards.