aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2017-09-21 17:52:36 +0100
committerMatthew Somerville <matthew-github@dracos.co.uk>2017-09-21 19:16:46 +0100
commit4481488cb83b89dce51933efb64606fb779e5d60 (patch)
tree1ab01547dbbc26d406fe98cf1103cbff3dced6ee
parent7f1717234c0315e231bb2a4f582287d68e976fea (diff)
[Oxfordshire] Make sure RDI file is encoded.
body_str is encoded with the provided charset/encoding, body is used as-is (and so will die in email sending if it contains wide characters).
-rwxr-xr-xbin/oxfordshire/send-rdi-emails3
1 files changed, 2 insertions, 1 deletions
diff --git a/bin/oxfordshire/send-rdi-emails b/bin/oxfordshire/send-rdi-emails
index ab58ff525..801c1a889 100755
--- a/bin/oxfordshire/send-rdi-emails
+++ b/bin/oxfordshire/send-rdi-emails
@@ -45,10 +45,11 @@ foreach my $inspector (@inspectors) {
my $hdrs = {
To => join('', 'fms', '_', 'admin', '@', $cobrand->admin_user_domain),
_attachments_ => [ {
- body => $rdi->construct,
+ body_str => $rdi->construct,
attributes => {
filename => $rdi->filename,
charset => 'utf-8',
+ encoding => 'quoted-printable',
content_type => 'text/csv',
name => $rdi->filename,
}