1
votes

So, I never expected to spend 6 hours trying to get Send DBMail working on SQL Server 2012, but here we are.

I'm trying to simply set up an SMTP server to use with Database Mail. I've tried both Verizon and Google. I've tested the settings in Thunderbird, and yet I still receive the following error:

10/31/2013 14:56:30,,Error,The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 1 (2013-10-31T14:56:30). Exception Message: Cannot send mails to mail server. (The operation has timed out.).),7084,6932,6038,,10/31/2013 2:56:30 PM,sa

This is getting ridiculous, I've scoured the web for similar issues and solutions, and found lots of ideas that didn't work. I even started an clean AWS instance with Server 2012 and it has the same problem. I've disabled Windows Firewall and Defender, and honestly I'm stumped and frustrated.

2
Stumped, frustrated and probably asking in the wrong place. You'd probably do better asking on Server Fault - user1864610
Could be anything, there could be a network firewall silently dropping your traffic, the mail server could be set up to only relay mail for particular IPs, this could be relevant for you if you are using AWS, I'd speak to your email team. - steoleary
This has step-by-step guidance, have a fresh start and see. blog.sqlauthority.com/2008/08/23/… - aads
It also may be your outbound SMTP server settings if you're leveraging an ISP or non corporate servers. - Techie Joe

2 Answers

0
votes

If you have access to add a role to your server then I would add the TELNET client for smtp testing. Test your smtp config using the following TELNET commands:

C:/>TELNET <mail server> 25
EHLO <mail server>
<IF AUTH REQUIRED ENTER CREDENTIALS>
MAIL FROM:<any [email protected]>
RCPT TO:<where you want mail to go @domain.com>
DATA
<ENTER>
<MESSAGE>
<PRESS PERIOD(".")>

If you do not get errors in telnet and/or the logs then Database Mail should work fine using MAIL SERVER. You need to set up a profile and mail account in sqlserver but the wizard is straight forward. Next, add a few operators with valid email addresses and you should receive your notifications.

0
votes

So after much stress, and trying a different server/version, I found that MailJet worked flawlessly, and I'm back up and running.

I think Steoleary is on to something that somewhere along the line, the connection is being silently blocked. Either way, for anyone who runs into this problem, try another mail server, and another one, and another one.

My guess is the database mail feature is acting as a relay, and Verizon and Gmail are blocking it.