I'm trying to setup a weekly task reminder to users with active tasks.
In my different environments I have to seperate it out so the emails only go to specific AD Groups for those environments,
Example:
In DEV
I need to send an email to each member of a Developers group - IF they have an email address in the stored procedure I'm using to feed in the names.
In MO
I have 3 AD Groups I am splitting out to send emails to.
I got it to work -however - if the name in the AD Group doesn't have any records - they still get an email but it's blank. I want to do like a if then else type thing on this loop. Tried using a Reference but it breaks if the name doesn't have a record.
Hope that makes sense
I have 2 stored procedures
1 that goes and createst a unique record for an active user with email / fqn
1 that goes and creates a list of all 'tasks' that belong to that user.
So I need to loop the SP to match AD but if they don't have a record - do not send an email.