join the MSSQLTips community

MSSQLTips.com - your daily source for SQL Server tips

Google
 
Web mssqltips.com

 
SQL Server 2005 Database Mail Setup and Configuration Scripts - MSSQLTips

MSSQLTips

MSSQLTips.com - your daily source for SQL Server tips
Welcome to MSSQLTips Sign in | Join | Help
in Search

SQL Server 2005 Database Mail Setup and Configuration Scripts

Last post 04-07-2009 5:19 AM by mcates. 6 replies.
Page 1 of 1 (7 items)
Sort Posts: Previous Next
  • 02-20-2008 12:30 AM

    SQL Server 2005 Database Mail Setup and Configuration Scripts

    This post is related to this tip: SQL Server 2005 Database Mail Setup and Configuration Scripts

    http://www.mssqltips.com/tip.asp?tip=1438

  • 04-24-2008 7:18 AM In reply to

    Re: SQL Server 2005 Database Mail Setup and Configuration Scripts

     

    I have configured the settings what you told. When i tested the test mail the following error message is getting displayed in the log file.

    The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 6 (2008-04-24T18:55:18). Exception Message: Cannot send mails to mail server. (Mailbox unavailable. The server response was: 5.7.1 Unable to relay for ravikoppula1@gmail.com).
    )

    Can you please suggest a solution.

    I tried wether smtp connection is working or not. It's working.

  • 05-01-2008 11:28 PM In reply to

    • tosc
    • Top 50 Contributor
    • Joined on 03-12-2008
    • Germany
    • Posts 12

    Re: SQL Server 2005 Database Mail Setup and Configuration Scripts

    Hi ravi1217,

     are you sure, that you choose the right smtp authentication? plz. tell us your configuration.

  • 07-03-2008 3:21 AM In reply to

    Re: SQL Server 2005 Database Mail Setup and Configuration Scripts

    ravi1217:
    I have configured the settings what you told. When i tested the test mail the following error message is getting displayed in the log file.

    The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 6 (2008-04-24T18:55:18). Exception Message: Cannot send mails to mail server. (Mailbox unavailable. The server response was: 5.7.1 Unable to relay for ravikoppula1@gmail.com).
    )

    Can you please suggest a solution.

    I tried wether smtp connection is working or not. It's working.

    Hi,

     On http://www.databasejournal.com/features/mssql/article.php/3626056 (a similar run through of how to set up database mail), an error was displayed that is similar to yours and shows how to solve it.  The error shown is about half way down the page, and the solution given is to open up port 25 to allow emails to be sent.

     HTH

  • 02-19-2009 9:02 AM In reply to

    Re: SQL Server 2005 Database Mail Setup and Configuration Scripts

    check the windows authentication instead of anonymous while creating an account.Hope this will help.

  • 02-19-2009 1:47 PM In reply to

    Re: SQL Server 2005 Database Mail Setup and Configuration Scripts

    Try to send an internal email that has the same domain as the mail server you used for your Database Mail profile. 

    It is possible there are settings in the mail server that are not allowing you to push mail outside of the domain.

  • 04-07-2009 5:19 AM In reply to

    • mcates
    • Not Ranked
    • Joined on 04-07-2009
    • Posts 1

    Re: SQL Server 2005 Database Mail Setup and Configuration Scripts

    First, I found this post absolutely helpful it was so clear and easy to follow.  And the best part was the t-sql at the end that helps explain and teach you how to do it through a script. 

    Second, there are two additional steps to acutally get SQL 2005 to send you email alerts about your jobs.

       1.  You must edit the properties of the SQLAgent and enable database mail and set the mail profile.

       2. You must create an operator to use to configure the maintenance plans to send the email alert to.

     Finally I would like to see an update of the post to included these two step, paticularlry the T-SQL code so that I can create a scipt to do all of it. 

     I have to say that this was a fantastic post and very helpful in that you show the wizard steps and the more complex t-sql steps and I found that portion wonderful and will use it in the future....

     Regards,

    Mike

Page 1 of 1 (7 items)