Jump to content

Need ideas / opinions for a new XMail docklet function


atreiu

Recommended Posts

Hi, I'm preparing the next XMail Docklet and i want to implement a new function, but need your opinions/ideas about it:

I want to implement notification system, currently just audio feedback. (in the far future maybe an animation and a preview of the email).

The question is, when should the Docklet notify the user? You think "when I have new mails, of course", but it's not that easy!

All I can calculate right now is the count of unread message on your account.

Let's say XMail shows you, that you have 10 unread message. Then you go to your Mail-Account, read all these message. Then you receive 5 more message. All this, between two checking intervals of XMail.

Everything what XMails can see, is that you have 10 unread message the first time, than 5 unread message on the second time. It does not know, if the later 5 message are new unread message or are leftovers from the first 10.

You see what I mean? A simple "Notify me if i have more unread message than on last check" doesn't always work.

I could do a "Notify me if the unread message count changes", but this would cause many false notifications.

Or what about "Notify me, if there are any count of unread message"? This would be like a reminder "read your mails!"

None of these possibilities are satisfying, imho. Does anybody else has another idea? Does anybody knows how Docklets from other docks handle this problem?

Besides: Does anybody know a nice "new Mail" - Sound i could use?

Cheers, Atreiu.

Link to comment

Can you read each mail message's header?

You can use some of those headers to uniquely identify the new mails!

Some interesting headers to take into account:

Message-ID

Date

From

Subject

I think if you take into account all of those headers, you could differentiate each unread message in a unique way.

So, let's see:

- You (by you I mean your docklet) check the mail and find there are 10 new mails.

- You retrieve each mail's headers and store them into... somewhere.

- The user decides to check mail, but he has time to read only 5 messages.

- Also a new message arrives.

- You check the mail again, and find there are 6 unread messages.

- You retrieve each mail's headers, and compare them to the ones you stored last time. You find 5 of the 6 messages have EXACTLY the same headers, so you discount them.

- Finally, you calculate that there is only 1 new message to notify about.

So, your docklet still shows number 6, because there are 6 unread messages, and plays an alert because there is 1 new message.

- Then, you (your docklet) check mails again, and find there are 6 new mail messages.

- Then you retrieve those 6 mail's headers, and find they are the same ones from previous check.

So, your docklet still shows number 6, again, but plays/shows no alert because no new messages were detected.

Now you see, you have a way to distinguish new messages from unread messages ;)

Hope this helps. If it still looks confusing, don't doubt to either quote here or contact/PM me. We're here to help each other.

Link to comment
Can you read each mail message's header?

You can use some of those headers to uniquely identify the new mails!

Some interesting headers to take into account:

Message-ID

Date

From

Subject

I think if you take into account all of those headers, you could differentiate each unread message in a unique way.

So, let's see:

( blabla ;) )

Yeah, I know, storing message IDs would be the ultimate solution.... I thought about this, too. My main problem with this solution is: it's slow. If people have a lot emails in there INBOX, it will take a lot time to get through them. AFAIK it's not possible to receive only new Mail's message headers, i would have to load all Message headers (every time, i think) then i can check if they have the unread or recent flag, than store the IDs or not. With my last version I did something like this (without storing the IDs, yet), but people complained that it took to long to check for, when they have 2000+ Mails in there Mailboxes. Have you got an idea, how to solve this?

I'm using TidIMAP4: http://www.indyproject.org/docsite/html/TIdIMAP4.html

it can notify of new unread emails, based on the time the email arrived.

That's a good idea and addition to matongas proposal! I would not have to save the data then, at least :D Still i would have to download the headers, of course...

reading pop mail other than google would be cool.

Sorry, i'm asking about this particular problem here. (POP3 is on wishlist since the beginning, but it will take a loooong time, till i implement this. And BTW: XMail doesn't support POP3 for google either. But it supports every provider with IMAP capabilities).

I've got a few "new mail" sounds I got googling around... but I am not sure where I got them (it was late that night)... PM if you want me to send them to you.

Thanks, but the key is: I must be allowed to use them. So I need Creative Commons or Public Domain or something. Have you anything like that?

Link to comment

Btw, notification system can be provided by Snarl: http://www.fullphat.net/index.php (Growl clone on windows)

Maybe it will be a good idea to add support of this notification system to XWD Kernel, not only to one or few docklets to give developers chance notify anything.

From my side I don't need any improvements like message headers or advanced notification. I have enough number of unread emails at the icon. The only thing is missing — is support for a proxy (that's why I can't use this docklet at work).

And another bug or suggestion.

Yesterday I have left my PC turned on and it worked all night long. Today's morning I have tried to check mail and immediately saw an error "Access violation… blah-blah-blah… Memory can't be read…"

Link to comment

I think there is one more way to get new messages(from gmail), not only by checking mailbox with interval. I think it's based on GTalk, xmpp or something like that. I've made such a conclusion when i saw how it's working in QIP, which informs me that time i really get a mail(and show part of message). don't think that it's time range check cause it will be too irrational. You should see how it works in qip(qip.ru) and u'l understand what i mean

Link to comment

Maybe because so many people (like me) use msn, describe how to get msn working in a readme or when you post the docklet and/or if the xmail docklet doesn't support hotmail, make it support hotmail.

Also, for when to notify person of mail. I don't know much about coding, but maybe when the unread mail number increases, it should notify you. Yes, it's possible for you to get new mail while you're reading mail, but that's not very possible and is the best idea I have so far. So what it will basically do is say keep a variable for unread mail; lets call the variable XYZ and you have 5 unread messages. When you read a message, unread messages will be 4, and XYZ = 4. But if you get new mail, unread messages = 5, and XYZ increases, and this is when it should notify you by audio.

So basically when XYZ increases, it should notify you.

Hopefully, this is a reasonable idea that works and I hope my explanation wasn't too confusing.

Link to comment

haran's idea is simple. It has one pro and one cons:

Pro: you know when to notify the user of new mail.

Cons: you can't know the number of new mails, just the number of unread mails.

Whatever, you can just show the number of unread mails and notify when new mail incomes. The only real drawback is this situation:

- Docklet checks mail and finds 5 unread messages.

- User go reads his/her mail but because of lack of time reads only 1 mail.

- So, now there are 4 unread messages.

- A new message arrives, now there are 5 unread messages.

- A minute has elapsed, so docklet checks again and finds 5 unread messages, and thinks no new messages arrived.

Headers would help a lot here. I think I'll write a demo with POP (I don't know IMAP that well) to illustrate.

Edit

I forgot two main reasons why POP would be different:

1. Messages aren't flagged as read / unread, so count may be impossible.

2. Messages can be uniquely identified without the need of reading headers, by issuing the UIDL command.

Link to comment
Guest
This topic is now closed to further replies.
×
×
  • Create New...