problems installing DatabaseMail

  • I've been trying to get DatabaseMail to work, with no success. I created a test profile to the mail server. When I try to send a test email, I get this error:

    The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 2 (2007-05-01T15:55:42). 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).

    Does anyone have any suggestions?

    Any help would be greatly appreciated!

  • try ping the smtp server. if pinging successful. Then try telnet smtp server 25. Port 25 is by default used as the smtp port if telnet is successful with that then u should not have any problems with setting up a dbmail profile.

    Cheers,
    Sugeshkumar Rajendran
    SQL Server MVP
    http://sugeshkr.blogspot.com

  • Thanks for the hints; I really appreciate it. I just tried to ping the server and the request timed out. I'll have to see what that problem is and then try telnetting the server.

    Elizabeth

  • Well so far no cigar... I pinged the server again and it worked fine. Then I telnetted into the smtp server on port 25 and that worked fine.

    I have check that DB Mail is enabled in Surface Area Configured. I'ved checked that users are properly configured using the command:

    EXEC msdb.sys.sp_helprolemember 'DatabaseMailUserRole' ;

    I've checked that users have are added to roles with

    sp_addrolemember @rolename = 'DatabaseMailUserRole',

       @membername = '<database user>'

    I've checked that DB mail is started and verified that the mail queue has state of receives_occurring. Unfortunately the mail isn't working for any of the profiles. I also changed the system parameters to have 5 Account Retry Attempts and 300 seconds for Account Retry Delay. Still doesn't work.

    Does anyone have any ideas? I'm stumped.

    Elizabeth

  • Is the mail server set up correctly?  With the setup here the mailserver has to be set up to allow requests from the IP address of our SQL Servers.

  • As far as I can tell it's set up correctly.

  • One thought - after you change mail settings in SQL 2005, you have to stop and start the SQL service before they will be applied.

  • Which SQL service are you talking about?

  • Crazy as it sounds, if you change your database mail configurations, you have to re-start the MSSQL Server Service to get many of them to apply. 

  • Wow! So I have to schedule a short down time to stop and start SQL Server Service. Amazing. And it doesn't mention any of that in the documentation...

  • Hi,

    also you have to verify that the mail server is prepared to accept mail from your sql server. Most mail servers nowadays have pretty tight security regarding relaying. does the email have a sender-address that belongs to the mails servers domain?

    regards

    karl

    Best regards
    karl

Viewing 11 posts - 1 through 10 (of 10 total)

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