aboutsummaryrefslogtreecommitdiffstats
path: root/perllib
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2016-06-07 13:16:51 +0100
committerMatthew Somerville <matthew-github@dracos.co.uk>2016-07-06 12:52:26 +0100
commitf48f6862dd45c2bbf8ea8a9c7a1762d0242d7195 (patch)
treee9f289c45cc7776004503e73eca957e44fa13853 /perllib
parentbb9ccbe08bc39f7a37aa8d9054b95f977d8629bb (diff)
Stop using Text::Wrap to wrap email bodies.
If we don't do this, the default quoted-printable encoding will make sure the lines are physically wrapped anyway. format=flowed could be an alternative, but I think "=" acting as a quasi-hyphen is somewhat nicer than every line ending with "=20". A better solution could be quoted-printable doing soft wrapping only at word breaks, making each line be readable though end with a " =", but that didn't seem worth the effort involved.
Diffstat (limited to 'perllib')
-rw-r--r--perllib/FixMyStreet/Email.pm8
1 files changed, 0 insertions, 8 deletions
diff --git a/perllib/FixMyStreet/Email.pm b/perllib/FixMyStreet/Email.pm
index d4bfee14e..3d363f80d 100644
--- a/perllib/FixMyStreet/Email.pm
+++ b/perllib/FixMyStreet/Email.pm
@@ -11,7 +11,6 @@ use Encode;
use POSIX qw();
use Template;
use Digest::HMAC_SHA1 qw(hmac_sha1_hex);
-use Text::Wrap;
use mySociety::Locale;
use mySociety::Random qw(random_bytes);
use Utils::Email;
@@ -189,13 +188,6 @@ sub construct_email ($) {
# nor followed (?!\n) by a blank line with a single space".
$body =~ s#(?<!\n)(?<! )\n(?!\n)# #gs;
- # Wrap text to 72-column lines.
- local($Text::Wrap::columns) = 69;
- local($Text::Wrap::huge) = 'overflow';
- local($Text::Wrap::unexpand) = 0;
- $body = Text::Wrap::wrap('', '', $body);
- $body =~ s/^\s+$//mg; # Do it again because of wordwrapping indented lines
-
$p->{Subject} = $subject if defined($subject);
if (!exists($p->{Subject})) {