[ https://issues.apache.org/jira/browse/FINERACT-1389?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17403442#comment-17403442 ]
Francis Guchie commented on FINERACT-1389: ------------------------------------------ I tried smtp.mail.yahoo.com and still got a few errors i am going to concentrate on smtp.gmail.com and once i master it then i can provide findings but i have changed the code to this below Properties props = mailSender.getJavaMailProperties(); props.put("mail.transport.protocol", "smtp"); props.put("mail.smtp.auth", "true"); 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"); props.put("mail.smtp.socketFactory.fallback", "false"); > Must issue a STARTTLS command first - Send Password to Email > ------------------------------------------------------------ > > Key: FINERACT-1389 > URL: https://issues.apache.org/jira/browse/FINERACT-1389 > Project: Apache Fineract > Issue Type: Bug > Components: User Management > Affects Versions: 1.0.0, 1.1.0, 1.2.0, 1.3.0, 1.4.0, 1.5.0 > Reporter: Francis Guchie > Assignee: Benura Abeywardena > Priority: Major > Attachments: image-2021-08-20-23-38-44-951.png > > > When I try to send password to email i get the following error > { > "developerMessage": "The request was invalid. This typically will happen due > to validation errors which are provided.", > "httpStatusCode": "400", > "defaultUserMessage": "Validation errors exist.", > "userMessageGlobalisationCode": "validation.msg.validation.errors.exist", > "errors": [ > { > "developerMessage": "Sending email failed; is parameter email is invalid? > More details available in server log: > org.springframework.mail.MailSendException: Failed messages: > com.sun.mail.smtp.SMTPSendFailedException: 530 5.7.0 Must issue a STARTTLS > command first. l15sm4064471ilo.22 - gsmtp\n; message exceptions (1) > are:\nFailed message 1: com.sun.mail.smtp.SMTPSendFailedException: 530 5.7.0 > Must issue a STARTTLS command first. l15sm4064471ilo.22 - gsmtp\n", > "defaultUserMessage": "Sending email failed; is parameter email is invalid? > More details available in server log: > org.springframework.mail.MailSendException: Failed messages: > com.sun.mail.smtp.SMTPSendFailedException: 530 5.7.0 Must issue a STARTTLS > command first. l15sm4064471ilo.22 - gsmtp\n; message exceptions (1) > are:\nFailed message 1: com.sun.mail.smtp.SMTPSendFailedException: 530 5.7.0 > Must issue a STARTTLS command first. l15sm4064471ilo.22 - gsmtp\n", > "userMessageGlobalisationCode": "error.msg.user.email.invalid", > "parameterName": "email", > "value": null, > "args": [ > { > "value": "francisguc...@gmail.com" > } > ] > } > !image-2021-08-20-23-38-44-951.png! -- This message was sent by Atlassian Jira (v8.3.4#803005)