STARTTLS is required when trying to send an email within SQL Server

Jason Yeung 61 Reputation points

I'm trying to setup a couple of alerts on SQL Server which sends me a message when the alert executes. I've setup an account in Database Mail, which sends an email via "", using port 587. Below is the settings I used (I removed the domain of the accounts for security purposes):

When I to send a test message, I get the following errors, depending on whether I have the "This server requires a secure connection" checkbox checked.

If this checkbox is not checked, I get:
Exception message: cannot send mails to mail. The server response was 5.7.3 STARTTLS is required to send mail

If this checkbox is checked, I get:
The server response was 5.7.57 Client not authenticated to send mail.

I also tried port 25, basic and anonymous authentication and a variety of users when using basic authentication, but the same errors appear. I was wondering how do I set the account up so I could send a message from SQL Server?



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

6 answers

Sort by: Most helpful
  1. AmeliaGu-MSFT 13,971 Reputation points Microsoft Vendor

    Hi JasonYeung-2529,
    What the version of SQL Server and OS are you using?
    Please refer to this doc to check if TLS 1.2 is supported for your OS and SQL Server, and make sure the TLS 1.2 is enabled.
    And here is a tool which may help you to manage protocols.

    Best Regards,

    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

  2. Francesco Mantovani 1 Reputation point

    nartac didn't worked.
    It's particularly bad because I'm using Windows Authentication


  3. Tooth Fairy's Tale 1 Reputation point

    Thank you TomPhillips-1744 for replying!! when I click the box, then it says, "The token supplied to the function is invalid" ?? (this is the program I am trying to send emails from called IBP) Is there another place I need to check that box?

  4. Tooth Fairy's Tale 1 Reputation point

    Should incoming mail be set at: SSL/TLS and outgoing set as: STARTTLS? However, in the outlook account settings, I'm not seeing a box to check for SSL?

    0 comments No comments

  5. Tooth Fairy's Tale 1 Reputation point

    If the above is correct, it is set at that... so I wonder what I am missing or doing wrong?