locked
My DB Mail settings aren't working. What else can I try? RRS feed

  • Question

  • I'm having my db mail leverage Google mail. Settings are as follows.

    Account Name: noreply

    email address: email address

    Display Name: Warehouse Monitoring

    Reply email: reply email

    server name: smtp.gmail.com

    port number: 465

    Requires SSL checked

    Basic auth checked

    user name: email address

    password: password

    confirm password: identical password entry

    I've gone into Google and set up less secure access. When I try to send a test email, I get the following vague error.

    The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 1 (2017-10-17T02:10:21). Exception Message: Cannot send mails to mail server. (Failure sending mail.).

    When I check the account activity log, I'm seeing that there aren't even any attempts to actually log in. My Outlook uses these exact same settings. I have a Python script that sends emails that use these exact same settings. All sitting on the same box.

    What am I missing here?

    Wednesday, October 18, 2017 1:32 PM

Answers

  • I would start here:

    https://www.mssqltips.com/sqlservertip/2578/setup-sql-server-database-mail-to-use-a-gmail-hotmail-yahoo-or-aol-account/

    Port 465 requires SSL.  I would first try port 25 and validate that works.

    • Marked as answer by falcon00 Wednesday, October 18, 2017 1:56 PM
    Wednesday, October 18, 2017 1:45 PM
  • It was the wrong port! My python script uses 465 but DB Mail wants 587. That's so weird! I thought requires SSL meant that you were doing the secure connection.
    • Marked as answer by falcon00 Wednesday, October 18, 2017 1:59 PM
    Wednesday, October 18, 2017 1:58 PM

All replies

  • I would start here:

    https://www.mssqltips.com/sqlservertip/2578/setup-sql-server-database-mail-to-use-a-gmail-hotmail-yahoo-or-aol-account/

    Port 465 requires SSL.  I would first try port 25 and validate that works.

    • Marked as answer by falcon00 Wednesday, October 18, 2017 1:56 PM
    Wednesday, October 18, 2017 1:45 PM
  • I get an error telling me to use SSL so at least I know it's pointing to the right place.
    Wednesday, October 18, 2017 1:51 PM
  • It was the wrong port! My python script uses 465 but DB Mail wants 587. That's so weird! I thought requires SSL meant that you were doing the secure connection.
    • Marked as answer by falcon00 Wednesday, October 18, 2017 1:59 PM
    Wednesday, October 18, 2017 1:58 PM