Database Mail Connection Issue

  • Hello Everyone !

    I have setup databasemail which will notify me about the backup alerts. My issue is after setting the DBMAIL when I ran send test email it does not send any email to the receipient. Checked Microaosft forum etc where they had asked to give the domain permission to the account and I have given it.

    I have added myself with DATABSEMAILUSERROLE too.

    I am able to telnet with SMTP.mycomany.com 25(port number)

    Not able to send it through sp_send_dbmail.

    Error :Message

    The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 3 (2008-05-09T11:22:50). Exception Message: Cannot send mails to mail server. (Mailbox unavailable. The server response was: 5.7.1 ... Relaying denied. IP name lookup failed [10.209.47.23]).

    )

    Do I need to configure SMTP server with some static IP address if so please guide me or post me some links.

    Thanks for your help.

    "More Green More Oxygen !! Plant a tree today"

  • I'm not sure if I figered the problem out correctly. Two questions I may ask:

    * Is the SQL service account able to connect to MS Exchange? (in this case your user looks like account 3)

    * Is the server in the domain in which MS Exchange resides?

    Cheers,

    Zubeyir

  • I Solved the issue this was the access permission issue to the SMTP mail server.

    Let me explain step by step how did I configure Database mail for SQL Server 2005 Sp2 on Windows 2003 sp2. 🙂

    1st Step

    ---------

    >> Generate a static IP address

    >> Gain access to the SMTP server

    for the above two steps you need to take help from the IT helpdesk team

    once done do the following.

    >> Enable Database Mail Stored Procs from the Surface Area configuration features

    >> Configure the Database mail

    2nd Step

    --------------

    >> Create Operator

    >> Create a Maint Plan

    >> Create alert with notification to email

    >> From the Jobs --> properties-->Alert --> specify the operator

    >> SQL Server Agent --> Properties --> Alert system --> Enable mail profile --> Select Database Mail

    Provided you have created operator

    >> Restart the SQL Server Agent

    3rd Step

    -------------

    Execute the job and check the INBOX.

    For me Bingo.........it worked.

    "More Green More Oxygen !! Plant a tree today"

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply