Kostya,
I've experienced the same error a few times on separate occasions (not networks-specific) while sending e-mail messages using Aquamail. (IMAP account, private server, sendmail+tls+sasl)
First of all, the error message is extremely quick, and it is hard to see/catch. After that the message sits in Drafts, and you can see no error message, which is inconvenient. The only way I was able to do that was by catching a screenshot (and that was possible only after a few tries).
Second, - I am still not sure what is actually happening. The error screenshot is attached:
"Error sending outgoing messages: Invalid security (SSL) certificate: java.security.cert.
CertPathValifatorException:
Trust anchor for certification path not found.."
Trying to resend the message was not providing anything to resolve the situation, except the opportunity to catch the error message in the screenshot.
With that, I had two (or three) guesses about what was causing the error:
1) either it is related to the change of the TLS (previously known as SSL) certificate as compared to the one seen previously, or
2) there is a problem verifying the chain of trust (either due to the connectivity issues or because of something related to the root certificates present on this phone (It is running Android 4.1.2).
(The server's TLS certficate is issued by Let's Encrypt Authority X3, whose root cert is "DST Root CA X3".)
However, yesterday (and at least once before) I was able to sent the message by the following trick: I went to the account settings, chose "manual", went through all the screen with the existing values, allowing Aquamail to connect to the servers, and finishing the "settings" without changing anything. After that, I went again to "Drafts", and was able to send the message.
I was expecting that this procedure would catch the updated certs or would offer me to review approve the change in the certs.
From this, I concluded that the culprit was 1) above.
Indeed, the server cert was renewed a couple of weeks ago, and since that, I haven't sent any message through this account from the phone (I use it primarily for reading, much less for sending messages, especially with this account.)
So, here are the questions:
1. Do you think my conclusion is correct about the underlying reason?
2. Why Aquamail (unlike in case of the IMAP server problems) does not offer the interface to accept the change in the certificate?
3. Why there is no change of certificate warning (and review) when you are going through the settings? Imagine the situation when I am going to those settings to change something rather than the server, e.g. password. At that point a MITM attack would be missed.
4. Why does the error message disappear so fast, as opposed to getting "stuck" the same way as it happens with the IMAP server.
All of this has been happening on a legacy (definitely pre-No-Zoom-On-Reflow) version of Aquamail, but I am not sure if you've changed anything in the SMTP-connection code in the past year. (Although, I remember you were changing something related to the change of TLS certificates.) So, if something that I've questioned above has been changed (fixed), - sorry for bringing it up (but I'd like to know that).
Phone: Droid Razr M running Android 4.1.2.