Click here to Skip to main content
15,891,372 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I got following error from log tables during email sending.
I have set ENABLE_BROKER for msdb.

The mail could not be sent to the recipients because of the mail server failure.
(Sending Mail using Account 1 (2016-01-08T11:07:45). 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 192.254.189.54:25). )
Posted
Comments
Suvendu Shekhar Giri 8-Jan-16 3:03am    
Can you share the relevant code?
Make sure that the port is not blocked.
Parag Sudhir Chaudhari 8-Jan-16 3:10am    
I am using following SP

EXEC msdb.dbo.sp_send_dbmail
@profile_name = 'MYProfile',
@recipients = 'xyz@gmail.com',
@copy_recipients = null,
@blind_copy_recipients = null,
@body = 'Test Body',
@body_format = 'HTML',
@subject = 'Subject'
Parag Sudhir Chaudhari 11-Jan-16 2:05am    
thanks Giri,
I checked 25 port which was blocked,I changed port to 587
and its working now .
Suvendu Shekhar Giri 11-Jan-16 2:38am    
Good to know that :)
ZurdoDev 8-Jan-16 8:46am    
The error indicates your mail server cannot be contacted. You'll need to figure out why. Either you have it configured wrong or it is down or something is blocking it.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900