Mail sending failed - sign-in attempt prevented
プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。
Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Fisheye および Crucible は除く
問題
When configuring the mail server for use with a Google Gmail account that doesn't use 2-step authentication, several things occur:
You see the following message in the Bitbucket Server UI:
Mail sending failed. Please verify the mail server configuration and check logs for details.
The following appears in the
atlassian-bitbucket-mail
.log:
org.springframework.mail.MailSendException: Mail server connection failed; nested exception is javax.mail.MessagingException: Could not connect to SMTP host: smtp.gmail.com, port: 465, response: -1. Failed messages: javax.mail.MessagingException: Could not connect to SMTP host: smtp.gmail.com, port: 465, response: -1
- Gmail sends an email stating that the sign-in attempt was prevented
原因
Since 2-step authentication is not being used, Gmail prevents this less secure method of authentication.
ソリューション
- Log in with your Gmail account.
- Find "Allow less secure apps" here.
- Turn on "Allow less secure apps".