0

I'm using a data-driven subscription to deliver a report to both a main recipient and a distribution list with a BCC to myself, only if there's data in the report and only from 5AM to 5PM. Everything is working fine except that it's not delivering to the distribution list. I've been searching all morning and can't seem to find the answer. Here's the query I'm using (with private info changed of course!):

SELECT TOP(1) DATEPART(HOUR, GETDATE()) AS CurrentHour,
       ReceivedDateTime,
       'Incorrect Values Report (xls listing)'  as SubjectLine,
       'single_recipient@domain.com; Report Distribution List' as toLine,
       'me@domain.com' AS BccLine
FROM VIEW_C9999_INCORRECT_VALUES
WHERE NOT (IDNumber IN( 'C1234', 'C5678')
AND DATEPART(HOUR, GETDATE()) BETWEEN 5 AND 17

There is no error message, it just doesn't deliver to the distribution list. I used the name of the distribution list (Report Distribution List) in the query, and it is the valid name of an existing distribution, but I guess I have to do this a different way? Any help will be appreciated!

AdrianHHH
  • 13,492
  • 16
  • 50
  • 87
JeffK627
  • 56
  • 6

1 Answers1

0

Finally figured it out - you need to use the distribution list's email address, not its alias. So instead of "Report Distribution List" it should be "ReportDistributionList@domain.com".

JeffK627
  • 56
  • 6