Added send dump

This commit is contained in:
M66B 2021-12-02 18:07:18 +01:00
parent 99217fa948
commit 96da5e018c
1 changed files with 5 additions and 2 deletions

View File

@ -660,8 +660,9 @@ public class ServiceSend extends ServiceBase implements SharedPreferences.OnShar
// Create transport
long start, end;
Long max_size = null;
try (EmailService iservice = new EmailService(
this, ident.getProtocol(), ident.realm, ident.encryption, ident.insecure, debug)) {
EmailService iservice = new EmailService(
this, ident.getProtocol(), ident.realm, ident.encryption, ident.insecure, debug);
try {
iservice.setUseIp(ident.use_ip, ident.ehlo);
iservice.setUnicode(ident.unicode);
@ -711,6 +712,7 @@ public class ServiceSend extends ServiceBase implements SharedPreferences.OnShar
end = new Date().getTime();
EntityLog.log(this, "Sent " + via + " elapse=" + (end - start) + " ms");
} catch (MessagingException ex) {
iservice.dump();
Log.e(ex);
if (ex instanceof SMTPSendFailedException) {
@ -732,6 +734,7 @@ public class ServiceSend extends ServiceBase implements SharedPreferences.OnShar
throw ex;
} finally {
iservice.close();
if (lastProgress >= 0) {
lastProgress = -1;
nm.notify(NotificationHelper.NOTIFICATION_SEND, getNotificationService().build());