From eb4b1bd96cfd14b03584cdaf6a02683938c5f8de Mon Sep 17 00:00:00 2001 From: M66B Date: Fri, 10 Jan 2020 15:06:25 +0100 Subject: [PATCH] Fixed 'syntactically invalid' workaround --- app/src/main/java/eu/faircode/email/MailService.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/MailService.java b/app/src/main/java/eu/faircode/email/MailService.java index f869a0b47b..37ace3ef87 100644 --- a/app/src/main/java/eu/faircode/email/MailService.java +++ b/app/src/main/java/eu/faircode/email/MailService.java @@ -370,8 +370,8 @@ public class MailService implements AutoCloseable { if (useip && ex.getMessage() != null && ex.getMessage().toLowerCase().contains("syntactically invalid")) { - Log.i("Using localhost=" + domain); - properties.put("mail." + protocol + ".localhost", domain); + Log.w("Using localhost=" + domain, ex); + ((SMTPTransport) iservice).setLocalHost(domain); iservice.connect(host, port, user, password); } else throw ex;