diff options
author | Mitch Jackson <mitch@freeside.biz> | 2018-07-28 14:46:38 -0500 |
---|---|---|
committer | Mitch Jackson <mitch@freeside.biz> | 2018-07-28 14:50:27 -0500 |
commit | a5bfed744069d69a1fe07eca1a64a2b22692cc22 (patch) | |
tree | 2e50b0089168763d42adb33d4593801de06a6072 /FS/FS/msg_template | |
parent | b548768fbbcdcae4df6f46ac38f0615437a20298 (diff) |
RT# 78547 - Flag to disable email/print/fax/etc during tests or reports
Diffstat (limited to 'FS/FS/msg_template')
-rw-r--r-- | FS/FS/msg_template/email.pm | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/FS/FS/msg_template/email.pm b/FS/FS/msg_template/email.pm index 37c1fab46..c2c370760 100644 --- a/FS/FS/msg_template/email.pm +++ b/FS/FS/msg_template/email.pm @@ -529,6 +529,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; |