diff options
-rw-r--r-- | perllib/FixMyStreet/App/Model/EmailSend.pm | 2 | ||||
-rw-r--r-- | perllib/FixMyStreet/EmailSend.pm | 12 |
2 files changed, 13 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/App/Model/EmailSend.pm b/perllib/FixMyStreet/App/Model/EmailSend.pm index 73086c65f..761856bde 100644 --- a/perllib/FixMyStreet/App/Model/EmailSend.pm +++ b/perllib/FixMyStreet/App/Model/EmailSend.pm @@ -35,7 +35,7 @@ elsif ( my $smtp_host = FixMyStreet->config('SMTP_SMARTHOST') ) { # Email::Send::SMTP $args = { - mailer => 'SMTP', + mailer => 'FixMyStreet::EmailSend', mailer_args => [ Host => $smtp_host ], }; } diff --git a/perllib/FixMyStreet/EmailSend.pm b/perllib/FixMyStreet/EmailSend.pm new file mode 100644 index 000000000..61d8a70c2 --- /dev/null +++ b/perllib/FixMyStreet/EmailSend.pm @@ -0,0 +1,12 @@ +package FixMyStreet::EmailSend; +use base Email::Send::SMTP; + +sub get_env_sender { + # Should really use cobrand's contact_email function, but not sure how + # best to access that from in here. + my $sender = FixMyStreet->config('CONTACT_EMAIL'); + $sender =~ s/team/fms-DO-NOT-REPLY/; + return $sender; +} + +1; |