I’d like to suggest adding the functionality to be able to send emails to a related field for Security Groups. I have already made a custom modification that migh worth moving to 7.1.2.
In aow_utils.php: line 610, add the related SecurityGroups to the dropdown:
if($obj instanceof Person || $obj instanceof Company||$obj instanceof SecurityGroup){
In actionSendEmail.php: around line 188, replace the case 'Related Field" section with:
case 'Related Field':
$emailTarget = $params['email'][$key];
$relatedFields = $bean->get_related_fields();
$field = $relatedFields[$emailTarget];
if($field['type'] == 'relate'){
$linkedBeans = array();
$id = $bean->$field['id_name'];
$linkedBeans[] = BeanFactory::getBean($field['module'],$id);
}else{
$linkedBeans = $bean->get_linked_beans($field['link'],$field['module']);
}
if($linkedBeans){
$linkedBean = $linkedBeans[0];
if ($linkedBean->object_name !='SecurityGroup'){
$emails[$params['email_to_type'][$key]][] = $linkedBean->emailAddress->getPrimaryAddress($linkedBean);
}else {
$users = array();
$users = $linkedBean->get_linked_beans( 'users','User');
$r_users = array();
foreach($users as $user){
$emails[$params['email_to_type'][$key]][] = $user->emailAddress->getPrimaryAddress($user);
}
}
}
break;