Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have two almost identical Windows Server 2008 R2 servers set up with Microsoft SQL Server 2012.

  • One server has a hardware firewall with port 25 open in both directions (plus opening RDP to certain IPs and opening ports 80 and 443)
  • One server uses a Windows firewall (default options, plus restricting RDP to certain IPs and opening ports 80 and 443)

I can send emails using msdb.dbo.sp_send_dbmail on the server with the Windows firewall. However the server with the hardware firewall returns in the log [msdb].[dbo].[sysmail_log]

The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 1 (2012-11-04T14:25:02). Exception Message: Cannot send mails to mail server. (Service not available, closing transmission channel. The server response was: Connection not accepted at this time). )

The email accounts and profiles are set up identically on both servers.

Does anyone have any idea why? I assume it is something to do with the firewall, although its possible one IP could be blocked by the mailserver.


share|improve this question
up vote 0 down vote accepted

I never got to the bottom of why this was happening. I spoke to support from the company providing the smtp mail server, who blamed the company responsible for the IP address, and vice versa.

However I used instead the mail server for gmail ( with SSL selected and port 587, Basic authentication) and the mails were sent correctly. [obviously I needed to open port 587 in the firewall first]

I then went a step further, and configured gmail to use the original settings for the smtp mail server, and this also worked!

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.