IMAP emails send via cellular data but not via WIFI

I am experiencing a strange problem trying to send emails from K-9 over WiFi. Any suggestions are greatly appreciated. I’m happy to generate some debug logs and submit them on GitHub, but wanted to make sure this is actually a bug and not user error.

If I turn off WiFi on my phone, K-9 is able to successfully send emails (using cellular data). If I turn WiFi on, K-9 cannot successfully send emails. However, in both cases the emails appear to have been successfully sent (appear in Sent folder).

I have uninstalled/installed K-9 and configured the email account settings from scratch (not imported)
I have rebooted the phone.
If I try this via the built-in email client (Samsung/Android) it sends successfully over WiFi and cellular.

I can send emails to myself (to same address as I’m sending from). My guess is this is just IMAP moving things around, but I don’t know enough about how IMAP works under the covers to be sure.

Here is the configuration

K-9 v6.602
on Samsung Galaxy S21 5G
Android v13 (updated as of 5/1/2023 with latest security updates etc)

K-9 Mail only uploads a message to the Sent folder after your provider’s mail server has accepted it for delivery. It is then up to the email provider to actually do that or to notify you of errors.

Please contact your email provider to find out what is happening exactly.

Thanks for the info cketti.

Upon further investigation it does seem to be some sort of hiccup between how the current version of K-9, my email/SMTP provider (hostgator), and the ISP with SMTP relay (Verizon/Fios) are all interacting.

The log shows a 250 response from the SMTP server, so naturally K-9 thinks everything went well. But somewhere things are not working. I tried the same thing with an older version of K-9 (5,x) on another Android device and it worked fine with Hostgator/Verizon. I then upgraded the version of K-9 to the current and it no longer works - yet the debugging log says it does. Mysterious.

Same hosts/ISPs but with a different email client and everything works.

Unfortunately, I don’t have the desire to plumb the depths of the code/internet to figure out why things aren’t working. Likely at a future date things will work again because something somewhere changes. Alas, I don’t have time to wait and can’t afford to have emails not get delivered (already had an issue because I thought email was sent and recipient never got it). Any suggestions on other stable mail clients for android?


If you search for hostgator on the forum you will find out that this is a known issue with that provider. For me new is that it depends on being on Wifi or cellular data. It really seems that hostgator does not follow the mail protocol standards.

@cketti : still I would vote for a workaround by flag for this known issue. As far as I know a workaround is know and K9 could implement it?

I seem to have this same problem - emails being sent only on cellular, not on wifi - and the problem seems to affect emails sent from a Microsoft account, a Gmail account, and a Mailfence account.

I don’t know what to do - except (as mentioned in this post) to uninstall and then reinstall from F-droid (after using K-9 to export its settings). And when I tried that . . F-Droid crashed. So then I installed K-9 from the Google Store. And when I tried to import settings I am told that the import of some settings failed. Seemingly the settings for my Gmail account were not imported. I recreated that account. And now everything seems to work, though I could really have done without all of this. So: here we have an eventual fix.

Have you checked if it is a similar issue to



tchara: thanks.

I think that the first problem that you mention - the one to do with Oauth - is irrelevant, because I did not see that error in my logs.

I think that the second problem that you mention - which has to do, I think, with being unable to send emails when on celluar - is irrelevant for the following reason. it was only on celluar that I coud send emails.

Also, and as my previous post said: I seem now to have solved the problem - by reinstalling K-9.

FWIW I decided to install prior copies of K-9 to see if/when sending via WiFI worked again. Once I reached 5.6 it worked, 5.7 does not. I tested 2x and got the same results 5.6 works, 5.7 doesn’t.

That said, I can’t be sure the issue lies solely in the K-9 code as there were some major updates to Android OS during the interim. A lot were security and I could see something along those lines easily messing things up.

I did contact Hostgator support and was impressed at the efforts they made to try and help me with the issue. They totally did not understand what I was explaining to them, but they happily promoted the ticket and then the top-level tech support also tried, but could not understand what the issue actually was. This is a complicated problem, so I didn’t really expect much from them, but was pleased they didn’t just blow me off. (I have come to live in a world of EXTREMELY low expectations.)

All in all, I’ve decided to switch to BlueMail. I don’t love it as much as K-9, but it seems to be the closest thing that meets my needs (GMail and Outlook just don’t do what I need). I suppose that sacrificing some UI niceties in return for actually getting email delivered is a small price to pay.

I may test some future releases of K-9 to see if the issue resolves, but at present I have spent all the energy and time I can on this problem. Good luck to everyone else and feel free to post here if you see that the issue may have been fixed or if you find something you think might be a workaround.

Thanks to everyone for your help!