From dfcdc73be63bbbbe62595a2522a0686589fefd6e Mon Sep 17 00:00:00 2001 From: Paul POULAIN Date: Mon, 12 May 2008 14:56:49 +0200 Subject: [PATCH] bugfix : ship utf-8 encoding in mail header Signed-off-by: Joshua Ferraro --- C4/Letters.pm | 4 +++- C4/Suggestions.pm | 3 ++- misc/cronjobs/overduenotices-30.pl | 2 ++ misc/cronjobs/overduenotices.pl | 2 ++ misc/cronjobs/reservefix.pl | 1 + opac/opac-userupdate.pl | 3 ++- 6 files changed, 12 insertions(+), 3 deletions(-) diff --git a/C4/Letters.pm b/C4/Letters.pm index 31033a8c6b..85c7a8518b 100644 --- a/C4/Letters.pm +++ b/C4/Letters.pm @@ -286,7 +286,8 @@ sub SendAlerts { From => $borinfo->{email}, Subject => "" . $innerletter->{title}, Message => "" . $innerletter->{content}, - ); + 'Content-Type' => 'text/plain; charset="utf8"', + ); sendmail(%mail); # warn "sending to $mail{To} From $mail{From} subj $mail{Subject} Mess $mail{Message}"; @@ -416,6 +417,7 @@ sub SendAlerts { From => $userenv->{emailaddress}, Subject => "" . $innerletter->{title}, Message => "" . $innerletter->{content}, + 'Content-Type' => 'text/plain; charset="utf8"', ); sendmail(%mail); logaction( diff --git a/C4/Suggestions.pm b/C4/Suggestions.pm index 4250db06f7..82eef06b5b 100644 --- a/C4/Suggestions.pm +++ b/C4/Suggestions.pm @@ -427,7 +427,8 @@ sub ModStatus { To => $emailinfo->{byemail}, From => $emailinfo->{libemail}, Subject => 'Koha suggestion', - Message => "".$template->output + Message => "".$template->output, + 'Content-Type' => 'text/plain; charset="utf8"', ); sendmail(%mail); } diff --git a/misc/cronjobs/overduenotices-30.pl b/misc/cronjobs/overduenotices-30.pl index 543f176be2..445df41cae 100755 --- a/misc/cronjobs/overduenotices-30.pl +++ b/misc/cronjobs/overduenotices-30.pl @@ -244,6 +244,7 @@ foreach my $branchcode (@branches) { From => $emailaddress, Subject => $mailtitle, Message => $notice, + 'Content-Type' => 'text/plain; charset="utf8"', ); sendmail(%mail); } @@ -271,6 +272,7 @@ foreach my $branchcode (@branches) { From => $emailaddress, Subject => 'Koha overdues', Message => $notice, + 'Content-Type' => 'text/plain; charset="utf8"', ); sendmail(%mail); } diff --git a/misc/cronjobs/overduenotices.pl b/misc/cronjobs/overduenotices.pl index 24e93f2e3e..95c17e19f8 100755 --- a/misc/cronjobs/overduenotices.pl +++ b/misc/cronjobs/overduenotices.pl @@ -134,6 +134,7 @@ while (($itemcount,$borrowernumber,$firstname,$lastname,$address1,$address2,$cit From => $from, Subject => $mailtitle, Message => $notice, + 'Content-Type' => 'text/plain; charset="utf8"', ); sendmail(%mail); } @@ -163,6 +164,7 @@ if ($count) { From => $from, Subject => 'Koha overdues', Message => $notice, + 'Content-Type' => 'text/plain; charset="utf8"', ); sendmail(%mail); } diff --git a/misc/cronjobs/reservefix.pl b/misc/cronjobs/reservefix.pl index 8e6d612e22..96b984ac29 100755 --- a/misc/cronjobs/reservefix.pl +++ b/misc/cronjobs/reservefix.pl @@ -101,6 +101,7 @@ my %mail = ( To => '$admin', From => '$library', Subject => 'Reserve problems', Message => $message, + 'Content-Type' => 'text/plain; charset="utf8"', ); sendmail(%mail); diff --git a/opac/opac-userupdate.pl b/opac/opac-userupdate.pl index deac903696..83fd4a5244 100755 --- a/opac/opac-userupdate.pl +++ b/opac/opac-userupdate.pl @@ -99,7 +99,8 @@ EOF To => $updateemailaddress, From => $updateemailaddress, Subject => "User Request for update of Record.", - Message => $message + Message => $message, + 'Content-Type' => 'text/plain; charset="utf8"', ); if ( sendmail %mail ) { -- 2.39.5