Set smtp host name for all protocols

This commit is contained in:
M66B 2019-02-12 18:51:11 +00:00
parent 11cd210031
commit 50ddbe3a46
1 changed files with 4 additions and 1 deletions

View File

@ -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);