Right now, I am using this code to send an email to the group of people that 
are part of a group.

I want to add another user to the group, but only want that user to get an 
email from 7pm to 7am m-f, and all day Sat & Sun.

Can anyone help me out with this?  Thanks!     We want to create an email 
address for an on-call email box.

-Mark

To: {
  my $GroupName = 'HelpDesk';

  # instantiate a group object
  my $addGroupObj = RT::Group->new($RT::SystemUser);
  $addGroupObj->LoadUserDefinedGroup($GroupName);
  return undef unless $addGroupObj;
  my $addGroupMembersObj = $addGroupObj->UserMembersObj;

  my $res = '';
  # walk through members of group
  while ( my $userObj = $addGroupMembersObj->Next) {
      my $email = $userObj->EmailAddress;
      next unless $email; # email can be empty

     $res .= ', ' if $res;
     $res .= $email;
  }
  $res;
}


Mark Jenks
Network Administrator
[IOD Incorporated E-Mail Signature Graphic 02-21-11]
1030 Ontario Road  Green Bay, WI 54311  p: 920.406.3702

[email protected]<mailto:[email protected]>


Electronic Privacy Notice. This e-mail, and any attachments, contains 
information that is, or may be, covered by electronic communications privacy
laws, and is also confidential and proprietary in nature. If you are not the 
intended recipient, please be advised that you are legally prohibited from
retaining, using, copying, distributing, or otherwise disclosing this 
information in any manner. Instead, please reply to the sender that you have
received this communication in error, and then immediately delete it. Thank you 
in advance for your cooperation

<<inline: image001.jpg>>

Reply via email to