Aman-Mittal commented on code in PR #5369:
URL: https://github.com/apache/fineract/pull/5369#discussion_r2720605554


##########
fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/service/GmailBackedPlatformEmailService.java:
##########
@@ -74,12 +74,16 @@ public void sendDefinedEmail(EmailDetail emailDetails) {
         props.put("mail.debug", "true");
 
         // these are the added lines
-        props.put("mail.smtp.starttls.enable", "true");
-        // props.put("mail.smtp.ssl.enable", "true");
-
-        props.put("mail.smtp.socketFactory.port", 
Integer.parseInt(smtpCredentialsData.getPort()));
-        props.put("mail.smtp.socketFactory.class", 
"javax.net.ssl.SSLSocketFactory");// NOSONAR
-        props.put("mail.smtp.socketFactory.fallback", "true");
+        // Only apply strict Gmail settings if we are actually connecting to 
Gmail
+        if (smtpCredentialsData.getHost() != null && 
smtpCredentialsData.getHost().endsWith("gmail.com")) {

Review Comment:
   What if user has email of other network provider what will happen? eg proton 
mail, yahoo , outlook?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to