susimail tweaks

This commit is contained in:
zzz
2017-12-09 17:32:17 +00:00
parent 46a342180d
commit cd51c9b3c4
2 changed files with 3 additions and 7 deletions

View File

@@ -323,9 +323,9 @@ class Mail {
shortSender = shortSender.substring(0, lt).trim();
else if (lt < 0 && shortSender.contains("@"))
shortSender = '<' + shortSender + '>'; // add missing <> (but thunderbird doesn't...)
boolean trim = shortSender.length() > 25;
boolean trim = shortSender.length() > 35;
if (trim)
shortSender = shortSender.substring( 0, 22 ).trim();
shortSender = shortSender.substring( 0, 32 ).trim();
shortSender = html.encode( shortSender );
if (trim)
shortSender += "&hellip;"; // must be after html encode

View File

@@ -34,7 +34,6 @@ import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.net.Socket;
import java.net.UnknownHostException;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
@@ -611,12 +610,9 @@ public class POP3MailBox implements NewMailListener {
try {
socket = new Socket(host, port);
} catch (UnknownHostException e) {
lastError = e.toString();
return;
} catch (IOException e) {
Debug.debug( Debug.DEBUG, "Error connecting: " + e);
lastError = e.toString();
lastError = _t("Cannot connect") + " (" + host + ':' + port + ") - " + e.getLocalizedMessage();
return;
}
if (socket != null) {