From 50ddbe3a465f79dec4bdad2258fb77033ad49e33 Mon Sep 17 00:00:00 2001 From: M66B Date: Tue, 12 Feb 2019 18:51:11 +0000 Subject: [PATCH] Set smtp host name for all protocols --- app/src/main/java/eu/faircode/email/ServiceSynchronize.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/eu/faircode/email/ServiceSynchronize.java b/app/src/main/java/eu/faircode/email/ServiceSynchronize.java index 418c1ad735..5553db3902 100644 --- a/app/src/main/java/eu/faircode/email/ServiceSynchronize.java +++ b/app/src/main/java/eu/faircode/email/ServiceSynchronize.java @@ -1905,7 +1905,10 @@ public class ServiceSynchronize extends LifecycleService { // Get properties Properties props = MessageHelper.getSessionProperties(ident.auth_type, ident.realm, ident.insecure); - props.put("mail.smtp.localhost", ident.host); + if (ident.starttls) + props.put("mail.smtp.localhost", ident.host); + else + props.put("mail.smtps.localhost", ident.host); // Create session final Session isession = Session.getInstance(props, null);