locked
Sql Mail 2005 to Exchange 2007 RRS feed

  • Question

  • I'm Trying to setup sql mail to my exchange 2007 server

     

    When I try to send a test mail i get the following error

     

    Error,4,The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 1 (2007-06-27T11:30:58). Exception Message: Cannot send mails to mail server. (The remote certificate is invalid according to the validation procedure.)

     

    How can i change the validation procedure tio accept the email?

     

    Thanks

    Wednesday, June 27, 2007 10:39 AM

Answers

  • You may find that you can uncheck the block for "This server requires a secure connection (SSL)".  You'll find this check box after configuring email, "Manage existing account".  That was all that i needed to fix this issue.
    steve
    Monday, June 20, 2011 6:24 PM
  • Please make sure that the service account running SQL Server can authenticate to Exchange server without any issues.

     

    Database Mail uses SmtpClient in .NET frameworks to send SMTP email. You can check this out with following powershell script

     

    Open powershell and type in the following powershell commands(replace user,domain, mailhost values)

     

    $user = "user"
    $emailFrom = $user + "@yourdomain.com"
    $emailTo = $user + "_to@yourdomain.com"
    $subject = "your subject"
    $body = "your message body"
    $smtpServer = "localhost"
    $smtpClient = new-object Net.Mail.SmtpClient($smtpServer)
    $smtpClient.UseDefaultCredentials = $True
    $smtpClient.Send($emailFrom, $emailTo, $subject, $body)

     

    Thanks

    Sethu Srinivasan

    SQL Server Manageability

    Use of included script samples are subject to the terms specified at http://www.microsoft.com/info/cpyright.htm
    Friday, November 7, 2008 6:58 PM
  • I had this error too, but I had a typo in the server name field where I specified the smtp server. Once I fixed that, the database mail worked great.
    Thursday, May 6, 2010 9:32 PM
  • I have found in the past the Exchange 2007  by default does not allow anonymous access to the mail server, and in some cases the system gets configured so that only specific hosts can connect to the mail server for routing. You should check that the account that you are using to connect to the mail system has vaild permissions to route email through the server. One way is to log onto the database server with the account to be used and telnet to the SMTP Server and port.

    With the setup you do not need to use the service account to send the emails, in some businesses I have seen them use a different email account for alerts, but this will depend on you business profiles.


    http://www.virtualrealm.com.au - XNA Game Programming News and Resources from Downunder.
    Thursday, May 6, 2010 11:56 PM

All replies

  • Can you check your authentication type? Go to Database mail configuration wizard -> Manage Existing account check the SMTP Authentication. Select the windows Authentication.

     

    Friday, June 29, 2007 10:59 AM
  • Hi Steve

     

    Thanks for your reply.
    I am now getting a time out error!

    Monday, July 2, 2007 9:11 AM
  • Did you ever get this resolved?  We just migrated to Exchange server 2007 and I am getting the same issue.
    Wednesday, October 22, 2008 3:51 PM
  • Please make sure that the service account running SQL Server can authenticate to Exchange server without any issues.

     

    Database Mail uses SmtpClient in .NET frameworks to send SMTP email. You can check this out with following powershell script

     

    Open powershell and type in the following powershell commands(replace user,domain, mailhost values)

     

    $user = "user"
    $emailFrom = $user + "@yourdomain.com"
    $emailTo = $user + "_to@yourdomain.com"
    $subject = "your subject"
    $body = "your message body"
    $smtpServer = "localhost"
    $smtpClient = new-object Net.Mail.SmtpClient($smtpServer)
    $smtpClient.UseDefaultCredentials = $True
    $smtpClient.Send($emailFrom, $emailTo, $subject, $body)

     

    Thanks

    Sethu Srinivasan

    SQL Server Manageability

    Use of included script samples are subject to the terms specified at http://www.microsoft.com/info/cpyright.htm
    Friday, November 7, 2008 6:58 PM
  • I had this error too, but I had a typo in the server name field where I specified the smtp server. Once I fixed that, the database mail worked great.
    Thursday, May 6, 2010 9:32 PM
  • I have found in the past the Exchange 2007  by default does not allow anonymous access to the mail server, and in some cases the system gets configured so that only specific hosts can connect to the mail server for routing. You should check that the account that you are using to connect to the mail system has vaild permissions to route email through the server. One way is to log onto the database server with the account to be used and telnet to the SMTP Server and port.

    With the setup you do not need to use the service account to send the emails, in some businesses I have seen them use a different email account for alerts, but this will depend on you business profiles.


    http://www.virtualrealm.com.au - XNA Game Programming News and Resources from Downunder.
    Thursday, May 6, 2010 11:56 PM
  • You may find that you can uncheck the block for "This server requires a secure connection (SSL)".  You'll find this check box after configuring email, "Manage existing account".  That was all that i needed to fix this issue.
    steve
    Monday, June 20, 2011 6:24 PM
  • I use the port 587 and set the server name like an IP. It works for me
    Tuesday, November 7, 2017 4:13 PM