0 votes

Hi, we want to send email notification to managers of empty distribution groups. So I created scheduled task targeted to group and in send action TO, I used '%adm-ManagerEmail%. But this action always end with error "Resolving value references in the notification recipient address '%adm-ManagerEmail%' resulted in an empty string."

Testing group has me as manager. My AD account has E-mail attribute filled.

What could be the problem?

Thanks

by (1.1k points)
edited by

1 Answer

+1 vote
by (230 points)

Hello,

The value reference %adm-ManagerEmail% is not available for group objects. The reason for this is the difference in attribute names. User objects can have a manager and the value is stored in the attribute named Manager. Group objects can have an owner and the value is stored in the attribute named Managed By. As such, attempting to use %adm-ManagerEmail% to retrieve the e-mail of the group owner will resolve in an empty string.

Currently, we don’t have virtual properties for object owners, but we have the feature in our roadmap.

The task you want to accomplish can be done using a PowerShell script. In your Scheduled Task, you will need to replace the Send email notification action with Run a Program or PowerShell Script and use the script below.

In the script:

  • $subject – Specifies the email notification subject.
  • $message – Specifies the email notification text.
$subject = "Notification for the manager of %name% group" # TODO: modify me
$message = "Message Text" # TODO: modify me

# Bind to the group owner
try
{
    $owner = $Context.BindToObjectByDN("%managedBy%")
}
catch
{
    $Context.LogMessage("No owner is specified for the group %name%", "Warning")
    return
}

# Get owner email address
try
{
    $ownerMail = $owner.Get("mail")
}
catch
{
    $Context.LogMessage("No email address is specified for the owner of group %name%", "Warning")
    return
}

# Send mail
$Context.SendMail($ownerMail, $subject, $message, $NULL)

Related questions

0 votes
1 answer

Is this possible? Example: User A executes a task in Adaxes. That task triggers a mail to another user. That mail needs to have User A as a reply adress.

asked Jun 21 by kjesoo (7k points)
0 votes
1 answer

Hi! I need a report of user accounts with empty attributes. Is there a possibility to make such report? Thanks in advance.

asked Sep 11, 2009 by philip (250 points)
0 votes
1 answer

We created a Scheduled Task and chose our user organisational unit as the activity scope. Then we realized that only about 10 % of the users are object-type: user and 90 % object- ... s no option in adaxes. But there is one for the object type User. Why that ?

asked 4 days ago by PGstoehl (490 points)
0 votes
1 answer

Looking for something that lists the icons and what they mean. The particular one I am looking for is

asked Nov 25 by mark.it.admin (480 points)
0 votes
1 answer

In Web administration I created Action for editing mail enabled group, but default service account doesn have rights to modify exchange. Is it possible to just this one Action pick another account? As it is possible in Custom Command?

asked Nov 21 by KIT (1.1k points)
2,031 questions
1,806 answers
5,156 comments
1,018 users