[rt-devel] Turning Mail Sending Off - Comments?
Stephen Turner
sturner at MIT.EDU
Wed Apr 7 15:04:25 EDT 2004
Hello,
I'm looking for feedback on this idea.
I'd like to be able to toggle RT's ability to send mail, so
that I can bulk-load tickets from a legacy ticket-tracking
system without sending mail to everyone involved.
Here's what I've come up with - I'd like to know if I've really done
what I intended, or if there's something else I need to consider.
1) Introduce a config variable "MailSendingOff"
2) in lib/RT/Action/ add this to SendMail->SendMessage
at the top of the subroutine:
if ($RT::MailSendingOff) {
write to log saying "mail not sent because of config"
return (1);
}
Does this sound sane? I'm thinking that this would allow me to
keep the web interface sending mail while from the command line I can run
my bulk load without mail sending, as long as I use a separate config
file for the load script.
Also, if this is considered a useful feature, I will submit a patch.
Thanks,
Steve
More information about the Rt-devel
mailing list