From 9bd5e6df60e3dd2e0012ca54e2752329ddb37d9d Mon Sep 17 00:00:00 2001 From: Milan Date: Mon, 23 Oct 2023 21:38:11 +0200 Subject: [PATCH 1/3] add libauthen-sasl-perl Email::Simple requires libauthen-sasl-perl for SMTP support. --- install/INSTALL.md | 1 + 1 file changed, 1 insertion(+) diff --git a/install/INSTALL.md b/install/INSTALL.md index f6ef974..538afa4 100644 --- a/install/INSTALL.md +++ b/install/INSTALL.md @@ -73,6 +73,7 @@ apt-get install libapreq2-3 libapache2-request-perl libapache-dbi-perl + libauthen-sasl-perl libauthen-passphrase-blowfish-perl libcalendar-simple-perl libcrypt-blowfish-perl From e06e4cbd413eded700f9265a2abfaa0c419638da Mon Sep 17 00:00:00 2001 From: Milan Date: Mon, 23 Oct 2023 21:39:47 +0200 Subject: [PATCH 2/3] mail.pm: encode body UTF8 bodies must be encoded --- lib/calcms/mail.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/calcms/mail.pm b/lib/calcms/mail.pm index be8addc..4b4dc08 100644 --- a/lib/calcms/mail.pm +++ b/lib/calcms/mail.pm @@ -8,6 +8,7 @@ use utf8; use Email::Sender::Simple(); use Email::Simple(); use MIME::Words qw(encode_mimeword); +use Encode; sub send($) { my ($mail) = @_; @@ -21,7 +22,7 @@ sub send($) { 'Reply-To' => $mail->{'Reply-To'}, 'Subject' => encode_mimeword($mail->{'Subject'}, 'b', 'UTF-8') ], - body => $mail->{'Data'}, + body => Encode::encode( utf8 => $mail->{'Data'} ), ); Email::Sender::Simple->send($email); } From 0a906b3e37ab830a1e9db7a444b7bb91409bc69d Mon Sep 17 00:00:00 2001 From: Milan Date: Mon, 23 Oct 2023 21:40:19 +0200 Subject: [PATCH 3/3] password_requests.pm: missing sender Email::Simple requires email sender. --- lib/calcms/password_requests.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/calcms/password_requests.pm b/lib/calcms/password_requests.pm index d5b8b41..0c0fe3c 100644 --- a/lib/calcms/password_requests.pm +++ b/lib/calcms/password_requests.pm @@ -145,6 +145,7 @@ sub sendToken ($$) { mail::send( { + "From" => $config->{locations}->{email}, "To" => $user->{email}, "Subject" => "request to change password for $baseUrl", "Data" => $content