yashsingh1/xdaforums huggingface dataset:
[Windows Mobile Development and Hacking General] gmurray:
These would queue up I believe, as its just a TCP socket. Data would only drop off if the queues filled up, and the communication doesn't get that chatty. That's unless I'm forgetting some of my winsock theory. Think the poutlook send/recieve is happening asynchronously anyway. Will have to check the API again.
[Windows Mobile Development and Hacking General] gmurray:
Oh sorry, I misunderstood you. I waited till the notification for the first message arrived (= send/receive done), to send the second message. So there were two seperate send/receives done.
[Windows Mobile Development and Hacking General] stevehead:
Testing on Touch (Elf) - failed

Hi,

I just got myself an Elf after dropping my trusty XDA Exec, and I thought it would be a good time to dive back into IMAP Push mail as it has always been rubbish and this project looks absolutely ideal.

I tried running the pusher service on the Touch with the original TMobile UK ROM, but no go. Got a 'retry count exceeded, last exception: could not connect to socket' Error.

SO I flashed the phone with a new ROM from XDA Dev (Blue v4) and tried again - same error message.

I can use PO to access my IMAP Mailserver at the same time, so I know I can connect OK from the phone.
[Windows Mobile Development and Hacking General] LordDeath:
This is a very interesting application :)

What if I want to stop the program? How can I exit it?

edit: After installing this my device hanged two times. Now I had to softreset twice. Maybe there is a problem?
[Windows Mobile Development and Hacking General] luniz97:
do i just run the exe on my mobile? does it need to be in a certain directory or anything?
[Windows Mobile Development and Hacking General] NguyenHuu:
^ yea just run the .exe. just put it any any directory you want. when u do it will open up a config screen for u to enter in your gmail info.

this app was designed mainly with GMAIL in mind, so maybe it's not working for some who are using other imap services?
[Windows Mobile Development and Hacking General] Menneisyys:
Wowz! Guys (not only you but all devs here), you REALLY should PM me if you release an app belonging to a category I've already written a Bible of. (In this case, the IMAP Bible; see the Wiki).

I'll definitely mention this app in my Misc News article.
[Windows Mobile Development and Hacking General] gmurray:
sorry, didn't read to much into where I should post about the thing. Was trying not to get too much attention till I ironed some things out.

If you are getting some sorts of socket errors when you try to start the program, try making sure the data connection is connected before starting the program. if not try to capture a trace and send it to me.

If you are having problems with it eventually locking up the phone, I'm getting this too, I'm either leaking some sort of resource, (which I'm looking into, maybe I'll have a fix soon), or perhaps pocket outlook has an issue after being asked to send/recieve via SyncMailMessages API many times? If this is true, things would hang up faster if you were recieving a lot of mail. Anyway, I'm looking into that.
[Windows Mobile Development and Hacking General] NguyenHuu:
thanks for the update. looking forward to new releases.
[Windows Mobile Development and Hacking General] stevehead:
Yep, I'm connected and can send/receive from my IMAP Pocket Outlook account no prob.
[Windows Mobile Development and Hacking General] gmurray:
ok, are you connected to activesync at the time? are you connected to the internet through a proxy? could you select trace when you start it next time and send me the resulting file?
[Windows Mobile Development and Hacking General] ljinsane:
cool ..thanks for the explanation...will give it a try
[Windows Mobile Development and Hacking General] gmurray:
btw, this program still needs to send some kind of heartbeat to the server every so often to make sure it is not disconnected from the server due to inactivity. By the IMAP spec, it should only have to do this every 29 minutes, but I'm not sure that Gmail complies. I currently have the default set to 9 minutes to be safe, but this was really because some other error was causing premature disconnections. You can probably raise this figure to lower the battery impact. But you have to be careful, as I have seen people complaining that Gmail disconnects you earlier than the IMAP spec allows for, although they may have fixed this by now. When I have time I'll be experimenting for the best setting that keeps you connected, while maintaining optimal battery life. Or if people are feeling interpid they can experiment with this and report the results.
[Windows Mobile Development and Hacking General] gmurray:
Yeah, I think I've found some areas where I might be leaking some resources if the app is running for a while. I'm going to try to clean those up a bit tonight, and maybe provide some more options as to which connection to use if I can get that working, we'll see.
[Windows Mobile Development and Hacking General] StarMonkee:
Do the latest versions still require .NET 3.5?

I'm using an older schaps rom with .net 2.0, and I'd love to give this a try - I've been looking for a decent imap idle app which integrates with pocket outlook for about a year now :D
[Windows Mobile Development and Hacking General] gmurray:
I'm just testing to see whether the latest version is more stable, and may release it later today, I'll see if I can downgrade it to fw 2.0 while I'm at it.
[Windows Mobile Development and Hacking General] gmurray:
version 0.5 is released. See first post for details. Held off trying to migrate to framework 2.0 as I'm using some of the advanced tracing features in 3.5 and it would take a while to migrate. Do people not have enough space for framework 3.5 on a whole?
[Windows Mobile Development and Hacking General] NguyenHuu:
will test the program now, version .5, a big jump from .23 hehe.

edit: tested and seems to be working fine. but i think there's something else that's happenned. my text messages are lagging and takes longer than it should to arrive.

i have my emails forwarded to my phone using sms. usually the sms arrives instantly when a mail is arriving in inbox like push. but now that imapService is running, those sms arent coming instantly anymore. there's a big lag time, even though the emails arrive now. this wouldnt be a big deal as i can disable sms forwarding. but it seems to affect other sms that are sent to me from people not just from the forwarder.

EDIT 2: now it seems to arrive instantly, the sms'. seems to be on and off now which is hard to tell if it's the server or the software.
[Windows Mobile Development and Hacking General] gmurray:
hmm... not sure, baut maybe when the email is arriving since I do a send/receive in outlook, maybe this slows down it noticing the sms notification that is coming in at the same time?
[Windows Mobile Development and Hacking General] gmurray:
don't know too well how sms works on wm, but don't really think anything I'm doing would interfere.
[Windows Mobile Development and Hacking General] NguyenHuu:
yeah it was jsut wierd, it was on and off, sometimes it comes in instantly sometimes not. but for the most part the latest release looks promising minus the sms thing. maybe that's unrelated who knows. the program as an imapservicer looks good. messages are received pretty much instantly when sent.

good idea adding the auto connect data, very handy. now if only you can build in for the next release an easy way to exit and restart the program. rite now i soft reset my phone to restart it. may be helpful in testing the app if it was an easier way to restart the program without soft resetting.
[Windows Mobile Development and Hacking General] StarMonkee:
I've got enough space for 3.5, but I've had problems in the past with it - plus my ROM has 2.0 cooked in, so upgrading just takes up more space rather than it being possible for me to uninstall the old one and reinstall the new one.

I'd love to be able to try out your app, as I said I've been looking for something like this for a long time, but I'll have to hold off until it's released for .net 2 (obviously if this is a problem for you then I totally understand if it never happens) or until I next flash my ROM (probably when the schaps wm6.1 version is released).
[Windows Mobile Development and Hacking General] gmurray:
hmm... well I'll see what I can do to refactor the tracing stuff.
[Windows Mobile Development and Hacking General] dogbeef:
Installed it and it works, but every time I restart the phone I have to enter my username/password again, is there anyway to hardcode it into the program or have some sort of .ini file that saves it, once that's taken care of, is there a way to put this into 'startup' so that it comes back on when the phone boots up?

Running DCD 3.2.. on a Sprint Mogul

thank you!
[Windows Mobile Development and Hacking General] gmurray:
What I'll probably do is to have thre program automatically save all of your settings other than the password, and then have an option to save the password. The problem is that I don't really know of a secure way to save your password on the phone so that its absolutely not recoverable if your phone were to be stolen, but I could make it at option, if you are willing to take that risk.
[Windows Mobile Development and Hacking General] stephano:
You can't make it ultimately unrecoverable for other people. You should encrypt the passwords using the built-in encryption libraries, and obfuscate the .net code.

This is considered "enough" on this platform, mainly because the devices don't have a secure chip inside them.

As you may know, Windows CE used to encrypt user passwords using the "susageP" key, which is the reverse of the code-name of the Windows CE platform.
[Windows Mobile Development and Hacking General] gmurray:
Yeah, personally encrypting with the passwords with a key that is very easy to yank out of my app (considering it's open source) isn't really enough for me, so it hasn't really been on my priority list to enable saving the password. But if using some fundamental encryption to obfuscate the retrieval of the cached password is enough for most users then I can add that option. I just would rather not perpetuate this kind of security hazard.
[Windows Mobile Development and Hacking General] stephano:
Maybe you should use a device-specific key. There is a universal Device ID, which you can access to.
[Windows Mobile Development and Hacking General] dogbeef:
I'll take my chances w/o encription, area where I live if someone steals my phone they'll probably end up using it to crack eggs for breakfast or nail things into the wall. Rednecks never quite figured out the whole 'identity theft' thing luckily.

You should put an autostarting/password remembering version up for us daredevils ;)

(is there a way to make it auto-REstart if it times out?)
[Windows Mobile Development and Hacking General] gmurray:
yeah actually, what it currently does is retry 3 times to reconnect t he service if it gets disconnected, which makes it somewhat resilient. what ill probably do is bump that up a bit more and have it wait longer each retry. I just don't want it to hamer google's servers. or hammer your phone if something is preventing it from getting to google's servers.
[Windows Mobile Development and Hacking General] Neo_Reloaded:
I am using tnyynt ROM with NET CF 3.5 and when I run the application it states that a newer version is requiered. The ROM has NET CF 3.5 on it.

Any idea how to run the application?

Thanks in advance.

Regards.
[Windows Mobile Development and Hacking General] S.V.I:
I already have imap gmail on my rom. it is actually odd that I even noticed. the 588 build that I am using has it.

although I still cant see the difference. besicaly, if I move my message to trash, it moves the message to trsh on the gmail servers?

perhaps I will find use for it some day. :)
[Windows Mobile Development and Hacking General] NguyenHuu:
to clarify, this program is not to enable imap for the account, because gmail already has imap for our WM devices. it's to take advantage of the imap idle in order to create a push-like effect for mail retrieval. simliar to an exchange server without having to poll xxminutes, itll automtically send new mail to your device as they arrive in your box.
[Windows Mobile Development and Hacking General] gmurray:
some roms have a prerelease version of .net cf 3.5. This may b why you are receiving the error.

yeah and the idea is to add push support to pocket outlook, which already does imap.
[Windows Mobile Development and Hacking General] LordDeath:
gmurray, what about a little pocket outlook plugin, which adds a new menu-entry for the imap push settings/status?
[Windows Mobile Development and Hacking General] gmurray:
Hmm.... I don't know much about Pocket Outlook extensibility, but if that sort of thing is possible, then I might be able to adapt this to run like that.
[Windows Mobile Development and Hacking General] LordDeath:
Yes, there is a way to put own menu entrys in there. Look here: http://blogs.msdn.com/dennisq/archive/2006/08/29/730874.aspx

This app adds a "Mark All as Read" entry into pocket outlook. And its sourcecode is according to that side in the PPC SDK.
[Windows Mobile Development and Hacking General] gmurray:
cool, I may look into that once I have dealt with some of the remainder of the issues people have identified. On a whole I don't relish having to write more native code though (as I'm sure that's required, and I don't like painful to write code if I'm not being paid for it), or complicating the deployment of the application (one would assume extending pocket outlook requires registry entries), but I'll definitely look into it.

Completely off topic but, I'm really disappointed with the amount of stuff you need to resort to P/Invoke for or write native code for on the WinMo platform. I love .NET on a whole, even more than Java, but its kind of silly that its so hard to do SSL without dipping down into winsock stuff that I haven't had to look at in a decade.

This makes Android seem like a really nice platform on a whole.

Iphone, not so much, seems lucrative, so I'm curious, by Objective-C makes me barf, to be honest.
[Windows Mobile Development and Hacking General] NguyenHuu:
off topic, but that mark all as read feature is very good option! but the delete all is pretty dangerous. to remove the delete all from the menu, download this file. unzp it and replace the file with the one on the phone.

http://xdaforums.com/attachment.php?attachmentid=60771&d=1197003970

sorry gmurray for getting side tracked. Any updates / further testing you been working with the app?
[Windows Mobile Development and Hacking General] nnph:
Thanks for developing this. I've been waiting for a while for a similar program. It seems that you have pooled it off and quite good :D I must say.

Q: Any idea how much data transf it uses per hour just for communicating, without any mail traffic?

As for suggestions I think an exit/restart feature would be interesting.

Thanks again and good luck with future releases.
[Windows Mobile Development and Hacking General] gmurray:
Depends on what you set the refresh timer to, this is how often I send some traffic to google to keep google from disconnecting the client for inactivity. You can set this to a higher value to make the traffic less frequent. But if you set it too high google will disconnect you for inactivity. Currently the default setting is probably too low, but I wanted to make sure to eliminate google disconnecting the client for inactivity, to make it more obvious when other errors were occurring. You can experiment with higher values to decrease traffic.
[Windows Mobile Development and Hacking General] StarMonkee:
Ok, I really want to give this a try now :D

Has anyone got a link for a cab for .net 3.5. I'm hoping it'll work ok with the 2.0 cooked into my ROM.
[Windows Mobile Development and Hacking General] gmurray:
they should just install side by side I think. You should be able to get that cab from microsoft somewhere I would think.
[Windows Mobile Development and Hacking General] gmurray:
http://www.microsoft.com/Downloads/...49-3C6B-42F1-9FD9-0041345B3385&displaylang=en
[Windows Mobile Development and Hacking General] StarMonkee:
Thanks, I appreciate it!

Just giving it a try now, I'll report back - I'll add my support for the storing settings in a file option :)
[Windows Mobile Development and Hacking General] StarMonkee:
OK, here are some first thoughts:

It seems to work really well, I'm going to leave it idle for a while then send an email to make sure it's still connected.

It would be great to have a simple GUI while the app is running to see the connection status, the number of heartbeats sent (possibly data usage) etc.. and to stop the service running at any time (I can't see an easy way of stopping it at the moment) - this is similar to emansio but this app seems far better from what I've experienced already.

Something which would make this perfect, and probably sellable, would be integration into pocket outlook. By this I mean adding a menu item to begin pushing a mailbox, and read the settings from the outlook database - I imagine this would be very difficult to achieve though.

While I've been testing it (without receiving any mail), it seems to send approx 25-30kb every heartbeat (using batterystatus to monitor with no other network aware apps running). It's not a problem for me as I've got web and walk, but it seems a little excessive for sending the IDLE command (could it be reconnecting and downloading headers again?). I think if I did a complete send/receive on the account with no email it would probably be less than that.

So far I'm impressed :D
[Windows Mobile Development and Hacking General] nnph:
I've been using the app for 2 days. It seems that may battery drains very quickly. Regarding the amount of data, like StarMonkee said it seems it uses a lot of data, not very convenient for me becose I have limmited service.

I wanted to ask why is that? it not such a big problem but I am very curious. :)
[Windows Mobile Development and Hacking General] NguyenHuu:
question: since edge does not allow for simultaneous voice and data, when not in the 3G coverage area, if we are on the phone does this disconnect our idle connection with the gmail server? i havent tested it yet but maybe you know?

it would suck if we are on the phone for maybe 15minutes or over an hour, and then forget we have imap idle set up and so if the connection is disconnected we may forget to to restablish the connection and so do not receive mail all day and just think this is normal and when you come home, you have an in basket with xx amount in the box!! scary hahah.

update: i tested it with a call and afterward the idle still was connected so it still received my test email right after my conversation on the phone. that's good news haha.

-----

since it's still in testing phase, i think an easier way to connect and disconnect the service/app should be added so we can easier test the program to make it sure it works. currently to disable the app i would need to do a soft reset on the device.

------

Update: i left the phone overnight with the idle on and it was still connected and receiving mail throughout the night. to test and make sure mail was still coming in instantly, i had my mail forward me an sms notification on new mail arrival. these sms notifications are alwasy instant so i can see when an sms arrived and when the imap idle went into effect. it worked and idle received my mail within seconds of receiving an sms notification.

i'm going to test it again all day today and see how reliable it is over 2 days. so far so good and if it still works after today/tonight i will disable my sms notifications and use this by itself. i'm just worried how long it can last, how many days/weeks it can be connected.

---------

i also agree that the heartbeat refreshs is a bit excessive being how a lot of my emails are below 15kb, a majority less then 7kbs. i also noticed a dramatic drop in battery life, 50% in about 5hours. sure i was doing tests which caused for an abnormal send/receiving condition, but still that's a lot. is it the imap idle thats draining the battery or is it the send/receiving that is draining the battery, maybe both but which has the greater impact. i may have to go back to my old method of getting push like mail using the sms trigger, that way i do not need to keep an always on connection. lucky i have unlimited sms and data or else that solution is gameover haha. i'll continue running test on this imap pusher because i really want it to work.
[Windows Mobile Development and Hacking General] snudel:
is it correct, that i have to re-setup everything after a soft reset/restart of my device?

if that is true, then i cant use this app :(
[Windows Mobile Development and Hacking General] gmurray:
I'm working on a version that will save the settings. Just been busy with other projects..

Have you tried setting the refresh at about 25, and see how the battery drain goes? It should perform comparably to active synch's direct push I would think. There really isn't much data being sent back and forth. But maybe if the heartbeat is every 9 minutes it keeps the radio too warmed up.
[Windows Mobile Development and Hacking General] gmurray:
The other possibility may be that pocket outlook is doing way too much when it is told to send/recieve, so if you are getting a lot of mail, that could be a drain. But it still should be a lot less than if you were having poutlook send/receive every 5 minutes. (Unless you get a new mail every 2 minutes, of course).
[Windows Mobile Development and Hacking General] NguyenHuu:
from 9minutes to 25 minutes is a big jump. have you tested it at this higher value yet? i can try it and see if its still reliable. keep us posted with updates to the app.

update: 25 minute refresh rate seems to be doing fine, havent gotten disconnected since i ran the test since this morning. battery usage is still bad though, but i guess that's the trade off to get push mail.
[Windows Mobile Development and Hacking General] pkley:
I'm also getting the socket time out error 16. Currently using Gmail IMAP so I know that's working.
[Windows Mobile Development and Hacking General] kwill:
so, what makes this different from just enabling imap service through gmail and then setting up your gmail acct on the device? emails already come as theyre received, even though the lowest interval on ur device can be set to 5 mins.
[Windows Mobile Development and Hacking General] NguyenHuu:
please read through the thread and you shall see. this is not to enable IMAP but to enable IDLE support. This will get rid of polling, so you dont need to check every 5 minutes like u are doing. you say email already comes as they are received, but that's only after you poll every x number of minutes. if u dont poll u dont get anything. but polling takes a lot of battery use and inefficient. why checked mail every x number of minutes when you only need to check it when you get it? simliar to having a p.o.box and driving out to the post office to check for mail everyday. how bout having the post office contact you as you only when you get new mail?

using this idle support, you dont need to checked at any interval at all. mail will come as it arrives on your server. think ms exchange server push mail, simliar concept./
[Windows Mobile Development and Hacking General] kwill:
i did read, and i guess i just misunderstood. so, with it polling. it checks every 5 mins, but i still get an email as soon as it receives, whether its been 5 mins or not. currently, i use youmail for a visual voicemail feel. it forwards my voicemail to my email in an mp3 also transcribed info in a text. i use gmail as the email acct and as soon as i get the text of the transcribed message, the email is right behind it. the only acct that works very slowly with push, is using hotmail and theres an actual option for it to be set for "when mail arrives". can this be used with hotmail as its imap? and thanks for the quick response.