I have spent the last couple of days searching everywhere on the internet and have not managed to find a solution or a proper explanation of my issue. since a couple of weeks ago without and update on our Microsoft SQL Server the DB_Mail has just stopped working and is reporting the below error in the log.
Date 2019-08-07 02:24:50 PM Log Database Mail (Database Mail Log)
Log ID 4924 Process ID 260668 Mail Item ID 3098 Last Modified 2019-08-07 02:24:50 PM Last Modified By sa
Message The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 2 (2019-08-07T14:24:50). Exception Message: Could not connect to mail server. (A system call has failed 10.x.x.x:25). )
What I have Tried
- I Have tried using the exact configuration in the DB_Mail Profile to send mails from Powershell and .Net and this works 100%
- Create a new Profile using the GUI
- Create a new profile using the Setup Script included in the installation "C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\ManagementStudio\SqlWorkbenchProjectItems\Sql\Database Mail"
- Tried to replace db mail with Darko Martinović's CLR solution, but get a base64 error link
- Open DatabaseMail.exe to see if I get any errors as describe in some articals, but seem to work find. Also replaced DatabaseMail.exe with that of another server in the same environment that does work, but this still does not work "C:\Program Files\Microsoft SQL Server\MSSQL14.MSSQLSERVER\MSSQL\Binn\DatabaseMail.exe"
Windows Server 2016 Standard
Microsoft SQL Server 2017 (14.0.3076.1)