diff options
author | louise <louise> | 2010-01-06 16:50:25 +0000 |
---|---|---|
committer | louise <louise> | 2010-01-06 16:50:25 +0000 |
commit | c36e904f6acda6fc7342fea477e3de4a626bd331 (patch) | |
tree | 442bd14bc3640243a8e2c5b8b9420727ae469e1d /bin | |
parent | d30d9bdfe87b71ba8763c23ecfab4336604e725d (diff) |
Don't send reports from a testing email address defined in the conf to any councils, don't include these reports in alert emails either'
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/send-alerts | 6 | ||||
-rwxr-xr-x | bin/send-reports | 9 |
2 files changed, 10 insertions, 5 deletions
diff --git a/bin/send-alerts b/bin/send-alerts index 0b14eadaf..1cf3686f9 100755 --- a/bin/send-alerts +++ b/bin/send-alerts @@ -6,7 +6,7 @@ # Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved. # Email: matthew@mysociety.org. WWW: http://www.mysociety.org # -# $Id: send-alerts,v 1.4 2009-07-13 17:56:36 matthew Exp $ +# $Id: send-alerts,v 1.5 2010-01-06 16:50:25 louise Exp $ use strict; require 5.8.0; @@ -36,6 +36,6 @@ BEGIN { my $site = CronFns::site(mySociety::Config::get('BASE_URL')); CronFns::language($site); - -mySociety::Alert::email_alerts(); +my $testing_email = mySociety::Config::get('TESTING_EMAIL'); +mySociety::Alert::email_alerts($testing_email); diff --git a/bin/send-reports b/bin/send-reports index 04ba57b91..c021b1dd3 100755 --- a/bin/send-reports +++ b/bin/send-reports @@ -6,7 +6,7 @@ # Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved. # Email: matthew@mysociety.org. WWW: http://www.mysociety.org # -# $Id: send-reports,v 1.78 2010-01-05 15:21:10 louise Exp $ +# $Id: send-reports,v 1.79 2010-01-06 16:50:26 louise Exp $ use strict; require 5.8.0; @@ -190,7 +190,12 @@ If you know of an appropriate contact address, please do get in touch. ]\n\n"; die 'Report not going anywhere for ID ' . $row->{id} . '!'; } - if (mySociety::Config::get('STAGING_SITE')) { + my $testing_email = mySociety::Config::get('TESTING_EMAIL'); + if ($row->{email} eq $testing_email) { + @recips = ( $testing_email ); + $send_web = 0; + $send_email = 1; + } elsif (mySociety::Config::get('STAGING_SITE')) { @recips = ( mySociety::Config::get('CONTACT_EMAIL') ); } elsif ($site eq 'emptyhomes') { my $council = $row->{council}; |