[rt-users] suppressing email generated by script to import tickets from another ticketing system
Jesse Vincent
jesse at bestpractical.com
Tue Jan 22 11:12:05 EST 2008
On Tue, Jan 22, 2008 at 03:30:28PM +0000, Tom H wrote:
>
> Hi,
>
> I have a script which imports tickets from another system using
> something like;
>
> foreach(ticket){
> $TicketObj->Create(subject, queue, priority, status);
> }
>
> etc. However I understand that that is going to trigger the sending of
> emails to all the watchers of these queues?
>
> is there any way to suppress that while this script is running?
I've previously used the following at the top of my script (after the RT::Init call):
{
no warnings qw/redefine/;
use RT::Action::SendEmail;
sub RT::Action::SendEmail::Commit { 1}
}
If that works for you, I'd be indebted if you could add it to the wiki.
Thanks!
Jesse
>
> Thanks,
>
> Tom
> _______________________________________________
> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
>
> Community help: http://wiki.bestpractical.com
> Commercial support: sales at bestpractical.com
>
>
> Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
> Buy a copy at http://rtbook.bestpractical.com
>
--
More information about the rt-users
mailing list