1
votes

I configured database mail profile as gmail smtp server, SSL and port 465. I didn't restart server. And this is first time to use Database Mail feature on that server.

When I send a testing mail it give me this error message:

The mail could not be sent to the recipients because of the mail server failure. (The operation has timed out)

I tried this mail configuration with Thunderbird and I could send messages througt this SMTP. Why is SQL Server giving this eror message? I searched here but didn't find any solution.

2
I still have same Problem :( - RedLEON

2 Answers

1
votes

First, have a look on SQL Server Database Mail log (Management -> SQL Server Logs -> Current, check Database Mail). It contains more detailed error explanation message.

However, most often the reason is in security configuration of Windows Server where SQL Server located. Look at firewall configuration on mail protocols and ports. To check if everything is good run your Thunderbird on the server where Database Mail profile is configured.

0
votes

I am experiencing the same issue here. In my case, I am trying to send emails from my SQL Server instance using the SMTPS configuration (port 465 for the outbound connection) but it is not working. If I try with any any mail client is working perfectly.

Something that I noticed is that trying to connect via TELNET with port 465 is not possible (I guess I would need openssl instead)

For some reason, my hosting provider still allows me to connect using port 26 but If I try sending emails via telnet is telling me that my dynamic IP is blacklisted (that explains why database mail failed with port 26). Even if the IP address is blacklisted, connection via authenticated smpt is allowed. This means either my hosting provider is not able to accept connections with port 465 using database mail or there is something wrong with my sql server installation.