[
https://issues.apache.org/jira/browse/FINERACT-1389?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17402454#comment-17402454
]
Francis Guchie commented on FINERACT-1389:
------------------------------------------
[~BLasan]
i think we need to look at the logic in file
*GmailBackedPlatformEmailService.java* at line 76
GmailBackedPlatformEmailService.java line 76
Properties props = mailSender.getJavaMailProperties();
props.put("mail.transport.protocol", "smtp");
props.put("mail.smtp.auth", "true");
props.put("mail.debug", "true");
try {
if (smtpCredentialsData.isUseTLS()) {
*// Needs to disable startTLS if the port is 465 in order to send the
email successfully when using the*
*// smtp.gmail.com as the host*
if (smtpCredentialsData.getPort().equals("465")) {
props.put("mail.smtp.starttls.enable", "false");
}
*// I think we should add this line so that starttls is enabled OR we
remove the above condition of port 465*
else {
props.put("mail.smtp.starttls.enable", "true");
}
}
SimpleMailMessage message = new SimpleMailMessage();
> 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": "[email protected]"
> }
> ]
> }
> !image-2021-08-20-23-38-44-951.png!
--
This message was sent by Atlassian Jira
(v8.3.4#803005)