BLasan commented on a change in pull request #1597:
URL: https://github.com/apache/fineract/pull/1597#discussion_r578924812



##########
File path: 
fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/service/GmailBackedPlatformEmailService.java
##########
@@ -55,31 +54,42 @@ public void sendToUserAccount(String organisationName, 
String contactName, Strin
 
     @Override
     public void sendDefinedEmail(EmailDetail emailDetails) {
-        final Email email = new SimpleEmail();
         final SMTPCredentialsData smtpCredentialsData = 
this.externalServicesReadPlatformService.getSMTPCredentials();
 
         final String authuser = smtpCredentialsData.getUsername();
         final String authpwd = smtpCredentialsData.getPassword();
 
-        // Very Important, Don't use email.setAuthentication()
-        email.setAuthenticator(new DefaultAuthenticator(authuser, authpwd));
-        email.setDebug(false); // true if you want to debug
-        email.setHostName(smtpCredentialsData.getHost());
+        JavaMailSenderImpl mailSender = new JavaMailSenderImpl();
+        mailSender.setHost(smtpCredentialsData.getHost()); // smtp.gmail.com

Review comment:
       Yuh, we can follow that approach as well. Main intention was to resolve 
this email sending issue. I'll do that if this changes are approved by the 
community. Thanks for the idea :)




----------------------------------------------------------------
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.

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


Reply via email to