summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Steven Schubiger <stsc@refcnt.org>2021-06-09 13:41:22 +0200
committerGravatar Steven Schubiger <stsc@refcnt.org>2021-06-09 13:41:22 +0200
commita3ac99f01d27682dc4dceb6b0a0a7c7a8e352295 (patch)
tree4392e6e2c51b647453f8677aaf3c9e8ca35f3670
parentc366cfdae6b04cea35e793f572ce1c293a1420d3 (diff)
downloadlugs-a3ac99f01d27682dc4dceb6b0a0a7c7a8e352295.tar.gz
lugs-a3ac99f01d27682dc4dceb6b0a0a7c7a8e352295.tar.bz2
lreminder: adapt to encoding fix
-rwxr-xr-xlreminder/reminder.pl18
1 files changed, 10 insertions, 8 deletions
diff --git a/lreminder/reminder.pl b/lreminder/reminder.pl
index 3326424..14ea60e 100755
--- a/lreminder/reminder.pl
+++ b/lreminder/reminder.pl
@@ -1,5 +1,5 @@
#!/usr/bin/perl
-
+#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
@@ -15,7 +15,7 @@
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#
# Author: Steven Schubiger <stsc@refcnt.org>
-# Last modified: Thu Feb 4 23:21:02 CET 2016
+# Last modified: Wed 09 Jun 2021 01:19:17 PM CEST
use strict;
use warnings;
@@ -25,7 +25,7 @@ use constant false => 0;
use DateTime ();
use DBI ();
-use Encode qw(encode);
+use Encode qw(decode encode);
use File::Basename ();
use File::Spec ();
use FindBin qw($Bin);
@@ -37,7 +37,7 @@ use Text::Wrap::Smart::XS qw(fuzzy_wrap);
use URI ();
use WWW::Mechanize ();
-my $VERSION = '0.52';
+my $VERSION = '0.53';
#-----------------------
# Start of configuration
@@ -240,11 +240,13 @@ ${\info_string()}
MSG
if ($run) {
+ $title = decode('UTF-8', $title);
sendmail(
- From => $Config->{mail_from},
- To => $mail_subscriber,
- Subject => encode('MIME-Q', "LUGS Reminder - $title"),
- Message => $message,
+ From => $Config->{mail_from},
+ To => $mail_subscriber,
+ Subject => encode('MIME-Q', "LUGS Reminder - $title"),
+ Message => $message,
+ 'Content-Type' => 'text/plain; charset="UTF-8"',
) or die "Cannot send mail: $Mail::Sendmail::error";
}
elsif ($test) {