Sending stopped working. (unexpected end of stream)

I’m using a Pixel 4xl with LineageOS. I downloaded K-9 mail and it installed very easily and worked perfectly. A few days ago I found mail in my Outbox that did not go out. My incoming mail works fine. I checked the Outgoing Server settings and reentered my password, then hit “Next” and got this error message: Setup could not finish - Cannot connect to server. - (Unexpected end of stream)

Help please?

This would appear to be an issue with your provider, or your connectivity to them, rather than K9. In order to provide any assistance we’ll need to know:

  • mail provider
  • outgoing mail configuration details
    – server name
    – port
    – security

smtp.mail.com
SSL/TLS
port 465

It also requires username and login, which I’ve supplied.

I’ve also tried:
STARTTLS
port 587

I get the same error message on either setting.

I’m able to use the email on my computer, which is what I’m using now and outgoing mail works, but outgoing mail still does not work on my Pixel phone, which worked fine until a day or two ago and I’ve not made any changes that I’m aware of.

Does incoming mail (using their imap.mail.com server) work?

Does your phone show IPv4 or v6 or both for its ipaddresses (under the phone’s “settings/about phone”)?

what version of K9 do you have installed?

Yes, incoming mail works fine, using imap.mail.com, SSL/TLS, port 993.
I’m using K-9 v. 6.603

Looking in “Settings/About Phone” I’m unable to find the IPv4 or 6 information. I’ve searched around but am unable to find it anywhere I’ve looked in the various menus and option screens. I put in a search for “IP” but nothing came up.

On my phone it’s under WiFi + Network, then tap on the connected WiFi. Looks like that has the SIMs IPv6 listed as well, but oddly enough the only IPv4 I can find is the one in the local LAN.

with android 14, the ipadresses that the device is using are listed about 2/3 of the way down on the settings/about phone screen.

where i was going with this is that both smtp. and imap.mail.com appear to only have ipv4 addresses. so, if your device is only using ipv6 you would have a problem reaching the server. that you aren’t having an issue with inbound mail would seem to indicate that that’s not the issue.

i’m assuming that the “Cannot connect to server” error is an indication of a reachability issue, not an authentication one. i’d expect something more along the lines of “authentication failure” for the latter - but could be wrong there.

I have a premium email account with phone support so I will give them a call and see if they can figure out what the issue is. The fact that it came up out of nowhere is weird.

I am encountering the same issue as the initial poster with K-9 on Android.
inbound email from spectrum works fine (imap)
Outbound email to spectrum (mail.twc. com) fails and email setup settings seem fine.

spaces added to domain names because forum says I can only have 2 links in a post.

K-9 version: 6.603
Email provider: Spectrum (former rr. com customer)
Spectrum Provided Settings
Username: Your full Spectrum-provided email address
Password: Your Spectrum-provided email password
SSL: On
Protocol: IMAP
Port: 993
Port: 587
Requires Authentication: Yes, or checked

Email Server
TWC. com and any domain ending in .rr. com

Incoming Email Server: mail.twc. com
Outgoing Email Server: mail.twc. com

If I select SSL/TLS for security in K-9 it sets the port to 465 and trying to finish setup returns:
Times out and says unable to open connection to SMTP server.
If I select STARTTLS for security it sets the port to 587 and trying to finish setup returns:
Cannot connect to server (unexpected end of stream)

I suspect Spectrum is doing something odd, I’ve tried switching things around as a test.

Any suggestions.

I am having the same issue as everyone on this chain. I tried both SMTP and IMAP. They both work fine on WIFI going direct to Spectrum but cell data with T-Mobile does not work and have tried every combination. There has to be a solution to this issue.

Currently setup as: but also tried other ports with and without SSL.
Server = mail.twc.com
Security = None
Port = 25

Send error is:
p-impout001.msg.pkvw.co.charter.net cmsmtp Connection rejected…

Works on WiFI but not cell data…

i would not expect you to be able to send on port 25 via tmobile. with your cable connectivity you are sending via their connectivity to their server, so they can control things. [i am a little surprised that spectrum seems to have port 25 outbound open, unless you have a dedicated IPnumber allocation.]

since authentication isn’t generally expected on port 25, tmobile won’t let you send using it.

you should be using either port 465 or 587 for outgoing, at least when using tmobile. check with the charter imap documentation on which they support.

TWC only allows port 25 from within their own network due to the usually unencrypted nature of communication on that port. You need to use SMTPs on 465 or 587 from other networks.

1 Like

Thanks… I have tried every combination of ports and servers. including 465 and 587. Seems like I did not have this issue on the the samsung client. Could it be a K-9 issue?

I did try all the Charter settings with no luck…