Sunday, February 19, 2012

Database Mail - Status sent but email never received

From SQL Management Studion I go to Management > Database Mail and I am trying to send a test email but I never receive anything. I checked my SMTP Mail Server Logs and I saw no entry of my test email.

I also I checked my SQL Database Mail Logs and everything seems fine, no errors are reported.

The msdb.dbo.sysmail_allitems shows my email status as "sent".

So what am I missing? What steps would you recommend for troubleshooting my problem?

Thank you,

Ric

Quick question if you are using Express if yes then your mail was not sent because the MSDN is home to the Agent and the Agent is not included with Express. Hope this helps.|||

No I am not using express, I am using the SQL Server 2005 standard version. Did I post at the wrong place?

Ric

|||

No you did not post in the wrong place but your problem is related to configuration and permissions. I have found two tutorials by SQL Server users check them to see what is missing in your configuration. Hope this helps.

http://www.sqlservercentral.com/columnists/cBunch/introtodatabasemailinsql2005.asp

http://www.databasejournal.com/features/mssql/article.php/3626056

|||

Thanks for your reply Gift. I did exactly what is mentionned in your articles however I get the exact same results. My test emails seems to be sent, no error message, status is mark as sent but no I see no trace of such email on the smtp server.

Issp_send_dbmail waiting for a reply from the SMTP server before to mark the email status as sent? Also if I had a problem of permission I guest I would have some kind of error? Same thing if the port 25 was block I guess?

Ric

|||

(msdb.dbo.sysmail_allitems)

The above from your original post tells me either you and the Agent or just one need permissions in the Server and MSDB database because I don't know why these things are not documented but most auxiliary automation tasks like mail runs out of the Agent database the MSDB database. So try that and post again if you still need help.

|||

Sorry Gift but you are loosing me hereConfused, I don't understand what you mean. If you think that I have a permission problem where should I look? Which permission and on what? How to give the proper rights if that is what's missing?

Thanks again,
Ric

|||

(Configuration component has two sub components. One is the Database Mail account, which contains information such as the SMTP server login, Email account, Login and password for SMTP mail.

The Second sub component is Database Mail Profile. Mail profile can be Public, meaning members of DatabaseMailUserRole in MSDB database can send email.)

I got the above from one of the links you need to create account both in your SQL Server and MSDB database and grant it DatabaseMailUserRole public role before your configuration will work. So go to the Security section under management in Management Studio and the new security section within MSDB to create the account with the right permissions. Hope this helps.

No comments:

Post a Comment