[rt-users] On create, send email only during time window?
Mark Jenks
mark.jenks at iodincorporated.com
Fri May 13 15:20:00 EDT 2011
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
mark.jenks at iodincorporated.com<mailto:mark.jenks at iodincorporated.com>
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20110513/72c78d7e/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.jpg
Type: image/jpeg
Size: 5294 bytes
Desc: image001.jpg
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20110513/72c78d7e/attachment.jpg>
More information about the rt-users
mailing list