summaryrefslogtreecommitdiff
path: root/FS/FS/msg_template/email.pm
diff options
context:
space:
mode:
authorMitch Jackson <mitch@freeside.biz>2018-07-28 14:46:38 -0500
committerMitch Jackson <mitch@freeside.biz>2018-09-19 00:37:18 -0400
commit18ef89c91d6ecb57d7f2c1814e60b8434ae84bed (patch)
tree1d6a3ff43f787d47a329f09723de4c3f2ac84e1b /FS/FS/msg_template/email.pm
parentc6251a1dcd226056780bf28f8ca79f078f8c78bd (diff)
RT# 78547 - Flag to disable email/print/fax/etc during tests or reports
Diffstat (limited to 'FS/FS/msg_template/email.pm')
-rw-r--r--FS/FS/msg_template/email.pm5
1 files changed, 5 insertions, 0 deletions
diff --git a/FS/FS/msg_template/email.pm b/FS/FS/msg_template/email.pm
index 63c860f..3850ede 100644
--- a/FS/FS/msg_template/email.pm
+++ b/FS/FS/msg_template/email.pm
@@ -505,6 +505,11 @@ sub send_prepared {
my $self = shift;
my $cust_msg = shift or die "cust_msg required";
+ if ( $FS::Misc::DISABLE_ALL_NOTICES ) {
+ warn 'send_prepared() disabled by $FS::Misc::DISABLE_ALL_NOTICES' if $DEBUG;
+ return;
+ }
+
my $domain = 'example.com';
if ( $cust_msg->env_from =~ /\@([\w\.\-]+)/ ) {
$domain = $1;