Scheduled mails gets stuck in Mail Error Queue with OAuth 2.0 SMTP setup

XMLWordPrintable

    • 2
    • Severity 3 - Minor
    • 40

      Issue Summary

      Scheduled mails gets stuck in Mail Error Queue with OAuth 2.0 SMTP setup. So far, impact has been noticed with the below emails:

      1. Confluence changes in the last 24 hours
      2. Recommended Updates Email
      3. Security alerts (for admins)

      Steps to Reproduce

      Lets take an example for "Confluence changes in the last 24 hours"

      1. Configure a mail server setup via OAuth 2.0
      2. As a Confluence Admin, create a page and add some content
      3. Go to Profile SettingsEmailSubscribe to daily updates (Enable) and Save.
      4. Wait for the Email Daily Reports job to run automatically at 00:00.

      Expected Results

      “Confluence changes in the last 24 hours” mail gets sent out

      Actual Results

      “Confluence changes in the last 24 hours” mail gets stuck in Mail error queue.

       

      Logs for reference:

      atlassian-confluence.log

      ERROR [Caesium-1-4] [atlassian.core.task.AbstractErrorQueuedTaskQueue] handleException Failed to execute task com.atlassian.mail.MailException: jakarta.mail.AuthenticationFailedException: failed to connect, no password specified?  

      atlassian-confluence-outgoing-mail.log

      ERROR [NotificationSender:thread-1] [atlassian.confluence.mail.ConfluenceMailServerManager] setAuthContextIfNeeded Failed to set authentication context for mail server SMTP Test
      org.hibernate.HibernateException: Failed to find org.hibernate.Session from the current thread 

      Workaround

      To use non-OAuth SMTP approach such as basic auth / app password.

      If that is not an option, 

      On the current setup, clicking on "try again" in the mail error queue, all emails will be sent.

              Assignee:
              Jeffery Xie
              Reporter:
              Bibek Roy
              Votes:
              3 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: