June 13, 2012 at 3:46 pm
Our environment is SQL Server 2008 R2. We use Database Mail for SQL Agent job success and failure notifications. When I started the admin on this server a few months ago, I found it that had been configured and the job notification mails for the last year are showing in the sysmail_sentitems. However, these mails are not being received by anyone on the distribution list that is used by the SQL Database Mail account. I've sent test mails directly to my mail account with the wizard, and with sp_send_dbmail. The results are the same they're in sysmail_sentitems, but I haven't received them.
I've checked every parameter I can find, and have been through various troubleshooting suggestions posted on the web. As far as I can tell everything checks out. Any thoughts on what I've missed?
Or, could it be something about the SMTP server specified in the account? I've checked the SMTP service on the server and it is running.
Thanks.
PS - I've checked my Junk Mail folder, too.
June 13, 2012 at 4:10 pm
If they're in the sentitems view it means they were accepted by the SMTP server. I think the issue will turn out to be somewhere between the SMTP server and the user's inbox.
There are no special teachers of virtue, because virtue is taught by the whole community.
--Plato
June 13, 2012 at 4:48 pm
First thing I would check given the information you've provided, is that all of the users exist in the distribution list that you are emailing. I've seen situations where there were orphaned users and for some reason email would not reach anyone.
June 14, 2012 at 8:22 am
The comments I've received so far have been helpful in ruling things out. I'm checking the SMTP server via telnet to see if it is relaying properly. If anyone has any other ways for checking the health of SMTP, please chime in.
Thanks very much!
June 15, 2012 at 8:14 am
I would suggest just doing some simple testing using T-SQL.
Try sending an email manually and see what it does. If using Exchange, ask the Exchange admin to check all the different areas where an email could get hung up. They should be able to at least tell you if it was received in the system.
Try this simple code, of course, changing the mail profile with the one you set up.
/***********************************/
/* Send Database Mail */
/***********************************/
--simple message
EXEC msdb.dbo.sp_send_dbmail
@profile_name = 'SQL Server Agent Mail Profile',
@recipients = 'someone@somecompany.com',-- use ; between if more than one
@body = 'This is a test of the emergency broadcast system....',
@subject = 'This is only a test' ;
--To get list of profiles, run this
EXEC msdb.dbo.sysmail_help_profile_sp --@profile_name = @ProfileName
June 15, 2012 at 8:16 am
OOOOPS!
Sorry, the @ProfileName in the last query comment line is a variable left over in my code.
June 18, 2012 at 1:27 pm
Thanks vikingDBA. I've sent the test mail, but haven't checked on the Exchange end. Thanks for the tip!
June 21, 2012 at 11:09 am
sking, I'm having exactly the same problem. Have you figured it out? I really appreciate any help...
June 21, 2012 at 11:21 am
No, but I think I'm making progress. Here are some of the things I've tried.
I've used telnet to connect to the SMTP server and have communicated successfully.
I've found the mails are in the c:\inetpub\mailroot\queue folder and in some cases there are delivery status reply notifications that say the mail server was unable to connect to the destination server. This means that even the error mails aren't being delivered. So I tried a different destination. No luck.
Thinking the mail may be detected as spam, I added a reply_to for the execute sp_send_dbmail.
I've also found that many of the mails are sitting in the c:\inetpub\mailroot\drop folder.
June 21, 2012 at 12:03 pm
Thank you, sking! If it's any help, I just found this on experts-exchange, unfortunately without much detail:
http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SQL_Server_2008/Q_26162648.html
Question:
Hi, I have database mail working fine except when I try to configure an Operator and use a DL (Distribution List) the email does not go out. It works if the Operator is a specific user email address that I'm sending to but when I try to send an email to a DL it never reaches. I don't get an error but the email never comes. Any ideas?
String of comments:
Expert Comment by: chapmandewPosted on 2010-05-05 at 10:05:58ID: 32645471
My guess (im a db guy, not an email guy) is that for the DL to work, it has to go through a specific server that knows the recipients. DB Mail uses an SMTP server, and so it probably doesn't know who belongs to the dist. list.
-----
Accepted Solution by: rrjegan17Posted on 2010-05-05 at 23:23:06ID: 32650192
Your DL name is not recognized by the SMTP server and check with your Exchange guy to fix it at Distribution List level.
-----
Author Comment by: Westside2004Posted on 2010-05-13 at 23:36:21ID: 32710963
Yes, we got it fixed, it was at the exchange level.
Thanks
-ws
June 21, 2012 at 5:39 pm
Sking, we were able to resolve the problem. Turned out, that the distribution list was not configured to receive emails from outside the organization, only from inside. Allowing emails from outside fixed the problem. I hope my explanation makes sense.
Also, apparently we are using Microsoft's Office 365 rather then Exchange server, so if you are on Exchange you might have a different issue. I hope it still helps...
June 22, 2012 at 8:35 am
So glad you were able to solve the problem. I ruled out the DL possibility by just using one, internal recipient. But every bit of information helps! Thanks very much.
Viewing 12 posts - 1 through 11 (of 11 total)
You must be logged in to reply to this topic. Login to reply