1

I have tried to send database mail but the following issue occurs.

The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 3 (2018-11-13T13:05:31).

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).)

I have done the few configuration as per suggestion in google search but still the same issue occurs.

Below are the steps which I have performed so far.

  1. I have enabled is_broker_enabled
  2. Enabled inbound and outbound rules for both 465 and 587 ports
  3. Ran the following stored procedure

    sp_configure 'show advanced options', 1;
    GO
    RECONFIGURE;
    GO
    sp_configure 'Database Mail XPs', 1;
    GO
    RECONFIGURE
    GO

enter image description here

Rahul Neekhra
  • 780
  • 1
  • 9
  • 39
Vengat
  • 235
  • 1
  • 5
  • 16
  • This definitely won't work with windows authentication. Use Basic authentication. Then you need to ensure that your gmail account is configured to accept emails from this server. Does this help?https://mathaywardhill.com/2017/03/01/setting-up-database-mail-to-use-my-gmail-account/ – Nick.Mc Nov 13 '18 at 10:54
  • @Nick.McDermaid I have not face any error while troubleshoot Gmail SMTP server connection. The Telnet smtp.gmail.com prompt showed the message like "Connecting to smtp.gmail.com..." for few minutes and closed automatically. – Vengat Nov 13 '18 at 14:36
  • Unfortunately the page I linked is only half useful. It doesn't tell you what a _successful_ telnet test looks like. Your test actually _failed_ - it timed out. You're meant to see a screen that says 'connected'. Something like this: https://mailtrap.io/blog/2016-07-26-how-to-test-smtp-server . I have deleted my other comment because that page is so useless! – Nick.Mc Nov 14 '18 at 00:49
  • 1
    To reiterate: you cannot connect to gmail. The issue is at the network level. You need to investigate firewalls etc. – Nick.Mc Nov 14 '18 at 00:50
  • facing the same issue, tried all the suggested answer that can found in the web, but no chance to get through. Wonder if you manage to find the solutions? – Mnemo Apr 15 '19 at 16:41

2 Answers2

2

You can try with Basic authentication, IN User Name: Your mail ID. Password: Your Gmail Password.

Bhargav J Patel
  • 166
  • 1
  • 6
0

None of the suggestions worked for me, other than making sure you do NOT have SSL ticked and Anonymous Authentication ticked only.

enter image description here

Fandango68
  • 4,461
  • 4
  • 39
  • 74