SQL Database mail not working, The mail could not be sent to the recipients because of the mail server failure

Cadel33333 1 Reputation point
2021-04-13T12:41:05.677+00:00

Hi,

My SQL Server stops sending mail without any changes. Now it says

"Message
The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 1 (2021-04-13T14:38:46). Exception Message: Could not connect to mail server. (A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 104.47.6.36:587)."

We have about 10 SQL instances and all have same problem.

Outgoing mail server (SMTP) settings are

e-mail address: support@organisation.com
Displayname: Support
reply-email: support@organisation.com
Server name: organization-com.mail.protection.outlook.com
Port number: 25
This server requires a secure connection (SSL) --> check

SMTP Authentication --> Windows Authentication using Database Engine Service Credentials

I changed Port to 587 and Server name smtp.office365.com but same error. I also tried different SMTP authentication setting (with my own email address) but nothing

Could you help me, please?

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
12,708 questions
{count} votes

6 answers

Sort by: Most helpful
  1. David Zou 26 Reputation points
    2022-01-26T15:45:25.747+00:00

    In Exchange admin center, the legacy TLS clients need to be check. and enable Active User's Authenticated SMTP168773-capture2.png168782-capture3.png

    3 people found this answer helpful.
    0 comments No comments

  2. Andreas Kreuzberg 96 Reputation points
    2021-04-13T14:26:17.617+00:00

    Hi,
    just use this small command line tool to test, if you are able to send emails from the server:

    https://techgenix.com/bmail-66/

    If you are able, then check your configuration in your sql server.

    Good luck

    Andreas

    0 comments No comments

  3. Tom Phillips 17,716 Reputation points
    2021-04-13T16:30:29.72+00:00

    Since all your servers are having the same issue, my guess is you have an Internet firewall blocking your access to port 587.

    0 comments No comments

  4. CarrinWu-MSFT 6,851 Reputation points
    2021-04-14T03:47:41.25+00:00

    Hi @Cadel33333 ,

    Welcome to Microsoft Q&A!

    Please follow below information to troubleshoot database mail issue, you could find the details from General database mail troubleshooting steps:

    1. You should be a member of the sysadmin fixed server role to troubleshoot all aspects of Database Mail.
    2. Is database mail enabled?
    3. Are users properly configured to send mail?
    4. Is database mail started?
    5. Do problems affect some or all accounts?
      87469-emai.png
    6. Retry mail delivery

    Best regards,
    Carrin


    If the answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

  5. Cadel33333 1 Reputation point
    2021-04-14T13:17:26.287+00:00

    Hi

    Thanks a lot for answers.

    I made some changes

    Outgoing mail server (SMTP) settings are

    e-mail address: portal@organisation.com --> I change this from email group address to email address without multifuncion
    Displayname: Support
    reply-email: support@organisation.com
    Server name: organization-com.mail.protection.outlook.com --> Changed to smtp.office365.com
    Port number: 25
    This server requires a secure connection (SSL) --> check

    SMTP Authentication setting

    Windows Authentication using Database Engine Service Credentials --> changed to Basic autenticaltion and user name is portal@organisation.com (non multifuncion email)

    I have no idea why those stopped working about a week ago. We didn't make any changes. Maybe some changes in the Office365?