yashsingh1/xdaforums huggingface dataset:
[Windows Mobile Software Development] pplippl:
How do I have deleted email go to Trash instead of "All Mail" in gmail?

I have enabled "Advanced IMAP Controls" and selected "Move the message to the Trash" in the imap setting. But when I delete an email from my phone I still see it goes to "All Mail" instead of "Trash" in gmail web.

Any idea? Thanks.
[Windows Mobile Software Development] chalid:
Tried 0.81, but its not working either ... as soon as the device goes into sleep mode, pushing stops working completly ... :-/

Maybe there is some problem with the HD2's sleep-handling.
[Windows Mobile Software Development] cjculley:
Looks promising. How can you configure to handle multiple email accounts?
[Windows Mobile Software Development] Fixup:
In my case, deleted messages are labeled as "Deleted Items". Then I can delete them to Trash.

camro has already made multiple accounts support in 0.61. You can use that and my Xin Conn Manager together. I'll add multiple accounts after the single account is stable enough.
[Windows Mobile Software Development] Fixup:
Made some changes in ImapPusher, hopefully solved the issues chalid experienced. Tested all day, no problem occurred.
[Windows Mobile Software Development] Fixup:
This one supports multiple accounts pushing, based on camro's 0.61 code. If you were using the single account version, you must uninstall it and delete the setting file.
[Windows Mobile Software Development] chalid:
will update my rom and report back ... maybe some program is causing the problem, because I can't see any pattern to the timeouts - and they weren't there from the beginning.
[Windows Mobile Software Development] Fixup:
That timeout does not work unless the phone's screen keeps on for the peorid. I'm looking into this issue and I think this is the cause for no pushing sometimes. Seems sometimes ImapPusher would hang somewhere without knowing the socket error, won't refresh neither when the screen is off.

Found out: the select() function for checking socket does not timeout during suspend mode, just like the Sleep() function. We need to find a solution for this.
[Windows Mobile Software Development] chalid:
yep, has to be the suspend mode. it just stops working.

02:33: processing ok
02:33: Sending: IMAP0002 SELECT INBOX

02:33: read: * FLAGS (\Answered \Flagged \Draft \Deleted \Seen)
* OK [PERMANENTFLAGS (\Answered \Flagged \Draft \Deleted \Seen \*)]
* OK [UIDVALIDITY 2]
* 2116 EXISTS
* 0 RECENT
* OK [UIDNEXT 2118]
IMAP0002 OK [READ-WRITE] INBOX selected. (Success)

02:33: processing ok
02:33: Sending: IMAP0003 IDLE

02:33: read: + idling

02:33: getting new messages
02:34: read: * 2117 EXISTS

02:34: exist arrived
02:34: new mailbox count: 2117
02:34: getting new messages
02:38: read: * 2117 EXISTS

02:38: exist arrived
02:38: new mailbox count: 2117

Even when coming out of suspend mode, nothing is pushed to the phone.

Did a little testing:

- Set up a simple mortscript to count the seconds and see if its a general problem with the HD2. But everything was fine - countdown was working fine while phone was locked.

- After that I set up a mortscript which kills and restarts the imappusherservice after 30 minutes. That worked like ordinary interval checking, so new mails were downloaded when the service restarted, but pushing didn't work when coming out of suspend mode.

:-/

But still, there is something odd going on, because I was running the idle-service 2 days without any problems. Maybe the suspend mode changes atfer a certain timeframe without activity, shutting down running processes or something ...
[Windows Mobile Software Development] Fixup:
chalid, the suspend issue of select() is always there, but you only notice it only when the server had an interrupt. When select() function is used, refresh never work. Basically, all functions that wait/sleep/suspend for an amount of time won't work on WM. I think most of the new WM programmers are not aware of this.

Anyway, I've fixed the issue. Now you must set the refresh interval properly, because socket error is no longer detected. If your network provider closes the socket, say, after 5 minutes, then you should set refresh to 5. If you set it to 10, then push won't work between 5 and 10.

[update] For timeout, has to treat it as socket error because an imap idle reset cannot keep the socket from being closed by Verizon (bad!). So in debug log you no longer see "timeout" but "socket error". To find out your network's timeout, try 10 first and send an email at 9. If the mail is pushed after 10, then your refresh must be shorter such as 5. Otherwise try longer such as 15.
[Windows Mobile Software Development] chalid:
already tried, but can't get it working at all. I fill in all the data, service starts sucessfully, but nothing is pushed at all. Tried a couple of times with different settings, but didn't work :-/

I'm trying fixup's new version right now.
[Windows Mobile Software Development] chalid:
Yep, this version fixes the issues I had! :D Had it running the whole day and got every single mail pushed to the phone - even after the device was in sleep-mode for ~2 hours.

THANK YOU! Now its perfect :cool:
[Windows Mobile Software Development] chalid:
Another thing ... :o: Battery drain of the last imappushservice is quite extensive. 40% battery drain in 10 hours with only 10 minutes phone calls and nothing else. :eek:

But its working very reliable. All mails got pushed to my phone. Maybe turn off syncing when reconnecting would help?
[Windows Mobile Software Development] Fixup:
Public Sub Connect(ByVal pUserName As String, ByVal pPassword As String)
m_UserName = pUserName
m_Password = pPassword

SetUpSocket()
Touch()

Dim _str As String = Read()
While True
Try
ReadPump(_str)
If Date.Now.Subtract(m_LastRefresh) > New TimeSpan(0, m_Refresh, 0) Then
Trace.WriteLine("Normal refresh has expired.")
ResetIdle()
'SetUpSocket()
End If
Catch ex As Exception
'If we have a problem doing a read, try to reset up the connection.
SetUpSocket()
End Try
Try
_str = Read()
Catch ex As TimeoutException
'We have timed out, we need to reset the idle command, and then continue on.
Trace.WriteLine("Got timeout exception")
ResetIdle()
'SetUpSocket()
End Try
End While
End Sub
[Windows Mobile Software Development] Fixup:
Of course it is better not to sync after each and every 5 minutes, but it was good to not enable this feature during debug. Here they are. I also added 15 seconds of sleep after the server refuses a connection. Please let us know how this version works, so I can upload to the first page too as the standard version.
[Windows Mobile Software Development] 1sae:
Is anyone else getting the ImapPusherService crashing? Mine seems to crash just about every time I get a phone call.

FYI this didn't happen with the original version I put in the windows folder. I'm using the multiple version.
[Windows Mobile Software Development] 1sae:
Not sure what part the SchedHandler is... so I don't think I'm using it (just the last two xImapPusherMultiple.cab) I am using a self signed cert for imaps, but that CA's cert was installed on the phone? I could try plan imap.

I just started using "Iconsoft Phone Extension" so I'm wondering if that was causing the issue? Just uninstalled that to test.

I'll report back after I try some of your suggestions.

Thanks!
[Windows Mobile Software Development] 1sae:
Hey camel,

You know what, I did try SchedHandler actually before this, but id didn't want to work on my device, not sure why... so it's not doing the same thing, but not working at the same time.

So "Iconsoft Phone Extension" didn't have anything to do with the crash, just coincidence.

I turned on the tracer, I've attached the last few minutes of it to the text file.

I've setup with gmail to see if i get the same prob, but so far so good. Might just be a prob with my server and a self signed cert. But like I said i've added the root CA cert to the phone, so ???

Edit:

Just crashed for me on my gmail account. Maybe it's something on my phone? I got a Samsung Intrepid and it's running winmo 6.5. Only Software running in background is SBP Mobile Shell.
[Windows Mobile Software Development] 1sae:
So I started using the most recent xImapPusher.cab, and get no errors or program crashes. So something thats different between xImapPusher.cab and	xImapPusherMultiple.cab is causing it.
[Windows Mobile Software Development] Fixup:
The multiple version is based on camro's 0.61; the single version is based on the original 0.60.
[Windows Mobile Software Development] Gearhead01:
Anyone else having major battery drain with the latest version of xImapPusher? I installed a couple of days ago and the program works great, but I was hoping for an increase in battery life with push rather than scheduled send/receive (was set for every 30 minutes), but instead I am seeing a considerable decrease in battery life.
[Windows Mobile Software Development] Fixup:
Read the first post about timeout applied by service providers.
[Windows Mobile Software Development] KENYONB:
Error with 2nd account

I just started using the program last night. I installed the multiple accounts CAB. So far, the program works well with Gmail. However, when I try to add another account, I enter in all the info and then get this error:

An unexpected error has occurred in ImapPusherService.exe

Select Quit then restart this program, or select details for more information.

A blocking operation was interrupted by a call to WSACancelBlockingCall

DETAILS:

ImapPusherService.exe

SocketException

A blocking operation was interrupted by a call to WSACancelBlockingCall

at

System.Net.Sockets.Socket.AcceptNoCheck()

at

System.Net.Sockets.TcpListener.AcceptTcpClient()

at

ImapPusherService.Module1.ListenerManager.WorkerThread()​

What does this mean? How do I fix it?

Thanks!
[Windows Mobile Software Development] bogdatov:
Yahoo IMAP push - not working

For whatever reason I cannot get Yahoo IMAP to work with this push solution. Using multiple accounts version.

- I do have proper IMAP setup for my Yahoo account and able to download emails every 5-10-30 minutes

- I now set it to once a day

- created imap account in "Accounts config"

- set username/password/IMPA server/port properly

- started push engine itself

- sent email to myself

- after 10 minutes my inbox on PPC still empty :(

Any recommendations ?
[Windows Mobile Software Development] Fixup:
According to the original author of ImpaPusher, different imap providers use the idle protocol differently, so he mainly got it to work with gmail. If you are not using gmail, you may try to modify the soruce code of ImapPusher 0.60.

I'm using gmail only, therefore I cannt test/modify it with other imap providers.
[Windows Mobile Software Development] marksr:
Hey Fixup-

Very happy with the app- installed it yesterday- Have been using System Seven on my Treo Pro and have been happy with it, except for the rare time the server's have issues, and then, not only do my emails come through in an untimely manner, but my battery drains from trying to log in- (last couple of weeks, but I believe it is fixed now)-

So I was happy when I saw your app noted in WMEXPERTS-

2 questions,

I've seen several times , both times after a phone call, an error page noting an error in xImapPusher and suggesting I shut down the service and restart it- which I've done and all is well again;

and secondly, it seems after a soft reset, the service has to be manually restarted-

Has anyone else mentioned this- or is it just me? I've scanned throught the pages, and don't believe I've seen anyone else mention these issues-

Thanks- for your fine work,

Mark

PS - just noticed the app isn't in the startup folder- I'll paste it in there and assume that will fix problem #2-

Mark
[Windows Mobile Software Development] Fixup:
Hi Mark, what's your phone and service? Mine is HTC Diamond on Verizon. I've not seen any trouble yet. You might post your log around the time the error occured, so I can see if I can fix it.
[Windows Mobile Software Development] 1sae:
Mark, I had the same issue. Are you using the multiple or the single program. For me the multiple crashed constantly, but the single is fine. I think it's a phone specific thing, seeing that it still did it for me using a gmail account and a hard reset. Camro said something about a certificate issue, but since my server requires ssl, I went back to using the original non multiple version.
[Windows Mobile Software Development] soaringeagle:
Same issue as Mark. Service doesn't automatically start after a soft reset. HTC Touch Pro 2.

Paul
[Windows Mobile Software Development] marksr:
I've got a Sprint Treo Pro-

As I stated before, simply copying (obviously not cutting but copying :)) the LoadXcm file from the PROGRAM FILES/XIMAPPUSHER folder into the WINDOWS/STARTUP folder makes it start running after a soft reset- so that problem is solved- but I still get the errror message after phone calls- and have to stop and restart the service

I'm using the multi version- think I'll switch to the single version and see if the problem persists-

Mark

By the way- I've been using it only with my GMAIL for now.
[Windows Mobile Software Development] rjmjr69:
Ok can you put up instructions for the lame users like me who have no idea what the ports etc should be? Should I have to make any adjustments say for a google gmail account? or say comcast? Im lost thanks this looks awesome
[Windows Mobile Software Development] Fixup:
Mark, you should use the single version, it has been rock solid so far, not a single problem yet. The multiple version also has no problem so far, it might be an issue with your phone or Sprint service. As I can only test gmail and verizon here and I have not seen any problem yet, I really cannot do anything about the problems others are having.

To start the service automatically after a soft reset, you may copy the shortcut from windows\start menu to windows\startup.

rjmjr69, you can find the readme file in the installation folder. Basically you set up your gmail account on your phone first and make sure it works (can send and receive mail). Then install the xImapPusher.cab, start it, input the account info and mail will be pushed to your phone.
[Windows Mobile Software Development] marksr:
Fixup-

Thanks for the reply

Already done x 2

Many thanks for your hard work-

Mark
[Windows Mobile Software Development] famewolf:
Thanks for xImapPusher. It is working well with my fastmail.fm imap email...if I send a msg to that account the indicator showing new mail shows up almost right away however the sound from sound and notifications which should play for new email msg never does.....is there something else I have to change?

Is there a repeating alarm for new email? Its never been an issue before.
[Windows Mobile Software Development] Fixup:
I just tested and fastmail.fm works no problem, notification is loud and clear. Make sure you checked notification sound for New Email Message. Also make sure Outlook is closed, or you won't get sound but flash.

For those who have not got fastmail to work with xImapPusher, make sure you use:

mail.messagingengine.com:993

I have a free account. So, at least xImapPusher works well with two of the major imap servers: fastmail and gmail. Both the single and multiple versions work fine and it is really cool to push gmail and fastmail side by side!

Other imap servers should work too, as long as you find out the correct domain name. For example, imap.fastmail.fm won't work with xImapPusher, even though it does work for Outlook. If you ping, you can see these two domain names for fastmail have different IP addresses.
[Windows Mobile Software Development] Fixup:
Uploaded a new version of xImapPusherMultiple to the first post:

1) Accounts config can now be closed, saving resource and potential troubles.

2) Removed unnecesary codes for the manager server, saving battery and potential troubles.

3) Added thread sync mechanism, no more crash when two or more messages arrive at the same time.

So far very solid pushing from gmail and fastmail.
[Windows Mobile Software Development] famewolf:
Does manilla2d count as having outlook open cause I can record a video showing that the mail icon shows a 1 within seconds of me sending a email from gmail to fastmail.fm (although I just specified mail.messagingengine.com and not the :993 on end) but no sound is played....assuming the problem is on my end can someone recommend a repeating new email alarm in case I'm not staring at the phone's main page?

Still an excellent job either way. <addon> I sent the email from gmail on pc to phone so no version of outlook was running in background. The account is configured as MANUAL in phone outlook since your program is handling it.
[Windows Mobile Software Development] rjmjr69:
Can you rename the files so we know what version is what please. Thank you for this great app
[Windows Mobile Software Development] Fixup:
Uploaded new versions:

1) Fixed a timeout bug with potential memory leak and hanging some accounts.

2) Both the single and multiple versions can be installed on the same phone. They use different config files. No longer need to remove one to use the other.

3) Distinguish icons with illustrative letters: P - single push, M - multiple push, C - config, S - service without connection manager.
[Windows Mobile Software Development] Marv-in:
Hello, is there a user-friendly way how to configure xImapPusher to disable pushing mails when roaming?
[Windows Mobile Software Development] Marv-in:
You're welcome. :)
[Windows Mobile Software Development] Marv-in:
Sorry, I have just returned from abroad and have read this thread now. Just now I have no chance to try roaming.
[Windows Mobile Software Development] rjmjr69:
Fix just want to report this is working just awesome I love this and will be sending donation thank you again very very good app works perfect for me on sprint stock rom tp2 using one gmail account
[Windows Mobile Software Development] marksr:
Hey Guys-

Seems to be working fine with the default 9 minute refresh- but does anyone know what Sprint's network timeout is so I can tweak the app?- I assume they have one-

Mark

PS Happy New year to all
[Windows Mobile Software Development] Fixup:
I've been using xHttpPush for a month now and it works like a charm. It is what I described in the text you quoted.

A http server is idle all the time, so it won't drain any extra battery. When a http request comes, it'll get it and take action.
[Windows Mobile Software Development] skyandsand:
Man, that's fascinating, xImapPusher works really perfect on my TD2. Thanks! :)

Just one question, how much data does this idle connection consumpt, let's say... per hour?
[Windows Mobile Software Development] rjmjr69:
any info on the sprint time out?

Also this seems not to let data disconnect?

I have an app installed that disconnects data session when idle for 30seconds. I shut everything off but this and it wont allow app to work I shut off and all works?
[Windows Mobile Software Development] rjmjr69:
Under the options there is a spot to change the TIMEOUT its set to 9 right now what is Sprints timeout?

And what I'm getting at is this

This app checks for emails via data right?

Well I have an app that closes the data connection after a set time of idle.

With this installed it will not work seems as if the connection is always on?
[Windows Mobile Software Development] rjmjr69:
Well that does help explain things a bit more. so does it drain much battery if its always on? guess thats what im getting at how can i use this and save juice
[Windows Mobile Software Development] rjmjr69:
Ok whats with the icon? Just a plain white ugly looking thing lol?

And does anyone knnow the timeout for Sprint? Ok if I set the value to 30 will it only look every 30 seconds or? Im sorta dumb with this today I can't figure it out.
[Windows Mobile Software Development] fwp:
I get this every time the service attempts to connect to my IMAP server.

I would LOVE to get this working! Awesome little application!

On my phone:

--------------

12:33 PM: socket errored out,

System.Exception: could not connect the socket. 10022

at ImapPusher.ImapClient.SetUpSocket()

at ImapPusher.ImapClient.Connect(String pUserName, String pPassword)

at ImapPusherService.Module1.Main()

reset client

error disconnecting. 10093

--------------

From the server side I see the following: (over and over once a second or so)

--------------

"TCPIP"	2660	"2010-01-13 12:38:48.265"	"TCPConnection - Posting AcceptEx on 0:143"

"DEBUG"	2660	"2010-01-13 12:38:48.281"	"Created TCPConnection"

"DEBUG"	2660	"2010-01-13 12:38:48.281"	"Creating session 212"

"IMAPD"	2660	212	"2010-01-13 12:38:48.281"	"<IP obscured>"	"SENT: * OK"

"DEBUG"	2660	"2010-01-13 12:38:48.609"	"Deleted TCPConnection"

"DEBUG"	2660	"2010-01-13 12:38:48.609"	"Ending session 212"

--------------

Any thoughts on this? Should not be a firewall issue...but I am not sure why it is failing. I will retry this on a WIFI connection but since I can connect to this server with the pocket outlook client with no special settings, I am thinking it's something with the xImapPusher service...

FYI my mail server is HMailServer latest version which does support IMAP Idle
[Windows Mobile Software Development] Fixup:
Try find out the correct imap server DNS name. For fastmail, for example, Pocket outlook can sync with both imap.fastmail.fm and mail.messagingengine.com, but xImapPusher can connect to the latter only, not the former.
[Windows Mobile Software Development] fwp:
This server is on my own domain, so I am sure I have the correct DNS name for it. I will do more testing and see if I can narrow it down more.
[Windows Mobile Software Development] fwp:
I will check it out. Thanks!
[Windows Mobile Software Development] rjmjr69:
ok Fixup I'm lost I had to hardreset and redownload this app single version I install it on my stock sprint rom and I get a folder in programs with two shortcuts. Now correct me but the last version I downloaded only installed one icon not in a folder and a shortcut in startup? I recall the shortcut in startup I'm having to manually create one its 53k I downloaded the last posted one and still same results????
[Windows Mobile Software Development] slapnutcity:
Dovecot connect

I've just installed xImapPusher on my HTC TD2 and setup an account to connect to my dovecot imap-server. I've named it in Pocket Outlook as 'imap'. In setting up the account in xImapPusher, I've filled the Box-field with the name 'imap', used my login and password and pointed to my email-server. After this, I've started the service and it starts to connect to my server. If I take a look again in the accounts settings, I can't seem to enable the button 'status'. Does this mean something is not setup correctly?

I also keep getting the following in my dovecot logs:

Jan 15 21:27:48 auth(default): Info: new auth connection: pid=16081

Jan 15 21:27:49 imap-login: Info: Disconnected (no auth attempts): rip=x.x.x.x, lip=y.y.y.y

Jan 15 21:27:49 auth(default): Info: new auth connection: pid=16082

Jan 15 21:27:50 imap-login: Info: Disconnected (no auth attempts): rip=x.x.x.x, lip=y.y.y.y

Jan 15 21:27:50 auth(default): Info: new auth connection: pid=16083

Jan 15 21:27:51 auth(default): Info: new auth connection: pid=16084

Jan 15 21:27:51 imap-login: Info: Disconnected (no auth attempts): rip=x.x.x.x, lip=y.y.y.y

This goes on and on each second. What am I doing wrong?
[Windows Mobile Software Development] Fixup:
Seems most users who have trouble is with their own IMAP servers. My thoughts are: 1) You do not config imap idle properly on your server; 2) Your server do not have a legit DNS host name; 3) Your server do not have a legit SSL certificate.
[Windows Mobile Software Development] famewolf:
Camro, why do you keep mentioning schedhandler over and over in fixup's thread? Doesn't schedhandler have it's own thread?
[Windows Mobile Software Development] camro:
i'm so sorry, i haven't see it with these eyes - and you're right :( (shame on me)

i also know "a little bit" about ImapPusher and error handling.

so, i was thinking that i can help to get a PUSH EMAIL solution which is working with a lot of options.

ok. i will now not write any more here about things or another applications.

<EOT-Last Post>

so, please forgive me.

cu camel