sql server not sending Gmail

sohrab khan 25 Reputation points
2023-08-10T05:17:15.36+00:00

hi every one ,

i have configured SQL server with Gmail to send email from MS SQL Server ,

my server name =smtp.gmail.com

checked (SSL)

port no 587

its configured successfully but when I send email ,it raise:

The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 1 (2023-08-09T22:03:44). Exception Message: Could not connect to mail server. (No such host is known). )

SQL Server Other
0 comments No comments
{count} vote

Accepted answer
  1. Olaf Helper 47,436 Reputation points
    2023-08-10T05:28:12.3266667+00:00

    SQL Server acts as a comon SMTP client, sending a mail to the server and if don't work, then you have a mistake in the configuration.

    2 people found this answer helpful.

2 additional answers

Sort by: Most helpful
  1. Anonymous
    2023-08-10T08:57:02.43+00:00

    Hi @sohrab khan

    Please refer to this document for general database troubleshooting: https://learn.microsoft.com/en-us/sql/relational-databases/database-mail/database-mail-general-troubleshooting?view=sql-server-ver15.

    I also found some links to setup database mail in SQL Server using Gmail, you can check if the steps are correct:

    https://www.mssqltips.com/sqlservertip/2578/setup-sql-server-database-mail-to-use-a-gmail-hotmail-or-outlook-account/,

    https://appuals.com/how-to-setup-database-mail-in-sql-server-using-gmail/.

    Hope these can help you.

    Best regards,

    Aniya

    1 person found this answer helpful.

  2. Javier Villegas 900 Reputation points MVP
    2023-08-10T09:29:00.09+00:00

    Hello

    Please follow this link. It is working fine for me

    https://appuals.com/how-to-setup-database-mail-in-sql-server-using-gmail/

    1 person found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.