Mail sending failed - sign-in attempt prevented

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

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.

*Except Fisheye and Crucible

Problem

When configuring the mail server for use with a Google Gmail account that doesn't use 2-step authentication, several things occur:

  1. You see the following message in the Bitbucket Server UI:

    Mail sending failed. Please verify the mail server configuration and check logs for details.

  2. 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
  3. Gmail sends an email stating that the sign-in attempt was prevented

Cause

Since 2-step authentication is not being used, Gmail prevents this less secure method of authentication.

Resolution

  1. Log in with your Gmail account.
  2. Find "Allow less secure apps" here.
  3. Turn on "Allow less secure apps".

Last modified on Sep 15, 2016

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.