aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbin/send-questionnaires8
-rw-r--r--perllib/Page.pm6
2 files changed, 9 insertions, 5 deletions
diff --git a/bin/send-questionnaires b/bin/send-questionnaires
index 43267643f..70c22bd78 100755
--- a/bin/send-questionnaires
+++ b/bin/send-questionnaires
@@ -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-questionnaires,v 1.6 2007-10-22 18:00:04 matthew Exp $
+# $Id: send-questionnaires,v 1.7 2008-03-21 14:31:39 matthew Exp $
use strict;
require 5.8.0;
@@ -77,11 +77,13 @@ foreach my $row (@$unsent) {
my $token = mySociety::AuthToken::store('questionnaire', $id);
$h{url} = mySociety::Config::get('BASE_URL') . '/Q/' . $token;
+ my $sender = mySociety::Config::get('CONTACT_EMAIL');
+ $sender =~ s/team/fms-DO-NOT-REPLY/;
my $email = mySociety::Email::construct_email({
_template_ => $template,
_parameters_ => \%h,
To => [ [ $row->{email}, $row->{name} ] ],
- From => [ mySociety::Config::get('CONTACT_EMAIL'), 'FixMyStreet' ],
+ From => [ $sender, 'FixMyStreet' ],
'Message-ID' => sprintf('<ques-%s-%s@mysociety.org>', time(), unpack('h*', random_bytes(5))),
});
@@ -91,7 +93,7 @@ foreach my $row (@$unsent) {
if ($nomail) {
$result = -1;
} else {
- $result = mySociety::EmailUtil::send_email($email, mySociety::Config::get('CONTACT_EMAIL'), $row->{email});
+ $result = mySociety::EmailUtil::send_email($email, $sender, $row->{email});
}
if ($result == mySociety::EmailUtil::EMAIL_SUCCESS) {
print " ...success\n" if $verbose;
diff --git a/perllib/Page.pm b/perllib/Page.pm
index fe6b21d4e..d27fe0f80 100644
--- a/perllib/Page.pm
+++ b/perllib/Page.pm
@@ -6,7 +6,7 @@
# Copyright (c) 2006 UK Citizens Online Democracy. All rights reserved.
# Email: matthew@mysociety.org; WWW: http://www.mysociety.org/
#
-# $Id: Page.pm,v 1.81 2008-03-12 17:26:21 matthew Exp $
+# $Id: Page.pm,v 1.82 2008-03-21 14:31:39 matthew Exp $
#
package Page;
@@ -344,10 +344,12 @@ sub send_email {
my $template = "$thing-confirm";
$template = File::Slurp::read_file("$FindBin::Bin/../templates/emails/$template");
my $to = $name ? [[$email, $name]] : $email;
+ my $sender = mySociety::Config::get('CONTACT_EMAIL');
+ $sender =~ s/team/fms-DO-NOT-REPLY/;
mySociety::EvEl::send({
_template_ => $template,
_parameters_ => \%h,
- From => [mySociety::Config::get('CONTACT_EMAIL'), 'FixMyStreet'],
+ From => [ $sender, 'FixMyStreet'],
To => $to,
}, $email);
my $out;