kriuk on Wed, 15 Aug 2012 17:57:56
I have configured Database mail account and then linked to Sql server Agent. After restarting I try to send test email from my server, but I encountered with following. Can any one let me know. Thanks
Olaf Helper on Thu, 16 Aug 2012 06:17:19
What's exactly the problem? You didn't receive the e-mail? Have you also checked your e-mail spam folder?
kriuk on Thu, 16 Aug 2012 11:47:04
Thanks for your replay, Yes I didn't received mail from database; Let me explain in detail
step 1: I created SMTP default profile by configuring Database mail.
step 2: Then I link up Database mail and SQL server Agent.
seep 3: Then I try to send Test Email through Database mail option.
Then I encountered with following
When I click on Troubleshoot option
What can I do now? Thanks
Olaf Helper on Thu, 16 Aug 2012 12:03:51
That's just the test option, because the SQL Server can't validate if you have received the e-mail.
Therefore when you start the test, you get that dialog. If you have received the e-mail then you click on the "OK" button to confirm that it's working; the your settings will be saved; that's all.
Iric Wen on Fri, 17 Aug 2012 02:36:36
To check the database mail sent status, please run the following query in MSDB:
select mailitem_id, sent_status from sysmail_allitems
select * from sysmail_event_log
In sysmail_allitems, you can check the mail id and the sent status, and in sysmail_event_log, you can see the description of the database mail, it includes the information or error message. Or you can right click “database mail” in SQL Server Management Studio, and click “view Database Mail log”, you can also get error messages here.
Please post the error message you received in error log for troubleshooting.
The “not found” error indicates that you have to install “client tools SDK” feature in your server you can install it or repair it by using SQL Server setup file.
Here is a reference for troubleshooting database mail:
Some other references:
kriuk on Mon, 20 Aug 2012 20:33:45
Thanks for your replay, after executing sysmail_allitems, Iyou noticed that all the mails which I try to send has got FAILED status, and in sysmail_event_log, the description of the database mail is as follow
"The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 4 (2012-08-20T21:09:33). Exception Message: Could not connect to mail server. (An attempt was made to access a socket in a way forbidden by its access permissions 18.104.22.168:587).)"
Please let me know how to resolve this issue. Thanks
Iric Wen on Tue, 21 Aug 2012 02:00:48
For this issue, please first ensure the mail account and password in your profile is correct, and the SMTP server is correct. And then make sure the port 25 or other mail port is not be forbidden by the firewall.
You can follow this blog: