duplicate emails in sql database mail

Duminda Dissanayake 0 Reputation points
2023-07-13T10:13:38.4566667+00:00

We have an application that sends an email using sp_send_dbmail.

  1. last Friday (07/07/2023) have sent 200 emails.
  2. The email was not sent and the database mail log shows the following error.

The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 1 (2023-07-07T09:02:13). Exception Message: Could not connect to mail server. (No such host is known).<nl/>)

  1. Those emails were duplicated more than 150 times and been sent on Monday.
  2. Why did this duplication happen?
SQL Server Other
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. LiHongMSFT-4306 31,566 Reputation points
    2023-07-14T05:27:30.4233333+00:00

    Hi @Duminda Dissanayake 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,

    Cosmog Hong


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    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.


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.