projects
/
BackupPC.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
* Copyright date update
[BackupPC.git]
/
bin
/
BackupPC_sendEmail
diff --git
a/bin/BackupPC_sendEmail
b/bin/BackupPC_sendEmail
index
055884a
..
f4845f3
100755
(executable)
--- a/
bin/BackupPC_sendEmail
+++ b/
bin/BackupPC_sendEmail
@@
-1,4
+1,4
@@
-#!/bin/perl
+#!/
usr/
bin/perl
#============================================================= -*-perl-*-
#
# BackupPC_sendEmail: send status emails to users and admins
#============================================================= -*-perl-*-
#
# BackupPC_sendEmail: send status emails to users and admins
@@
-13,7
+13,7
@@
# Craig Barratt <cbarratt@users.sourceforge.net>
#
# COPYRIGHT
# Craig Barratt <cbarratt@users.sourceforge.net>
#
# COPYRIGHT
-# Copyright (C) 2001-200
7
Craig Barratt
+# Copyright (C) 2001-200
9
Craig Barratt
#
# 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
#
# 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
@@
-31,7
+31,7
@@
#
#========================================================================
#
#
#========================================================================
#
-# Version 3.
1.0, released 25 Nov 2007
.
+# Version 3.
2.0beta0, released 5 April 2009
.
#
# See http://backuppc.sourceforge.net.
#
#
# See http://backuppc.sourceforge.net.
#
@@
-373,7
+373,7
@@
sub sendUserEmail
$vars->{domain} = $Conf{EMailUserDestDomain};
$vars->{CgiURL} = $Conf{CgiURL};
$subj =~ s/\$(\w+)/defined($vars->{$1}) ? $vars->{$1} : "\$$1"/eg;
$vars->{domain} = $Conf{EMailUserDestDomain};
$vars->{CgiURL} = $Conf{CgiURL};
$subj =~ s/\$(\w+)/defined($vars->{$1}) ? $vars->{$1} : "\$$1"/eg;
- $vars->{subj} =
$subj
;
+ $vars->{subj} =
encode('MIME-Header', $subj)
;
$mesg =~ s/\$(\w+)/defined($vars->{$1}) ? $vars->{$1} : "\$$1"/eg;
SendMail($mesg);
$UserEmailInfo{$user}{lastTime} = time;
$mesg =~ s/\$(\w+)/defined($vars->{$1}) ? $vars->{$1} : "\$$1"/eg;
SendMail($mesg);
$UserEmailInfo{$user}{lastTime} = time;
@@
-403,13
+403,7
@@
sub SendMail
printf("Can't run sendmail ($Conf{SendmailPath}): $!\n");
return;
}
printf("Can't run sendmail ($Conf{SendmailPath}): $!\n");
return;
}
- if ( $utf8 ) {
- binmode(MAIL, ":utf8");
- if ($mesg =~ /^Subject: (.*)$/m) {
- my $new_subj = encode('MIME-Header', $1);
- $mesg =~ s/^Subject: .*$/Subject: $new_subj/m;
- }
- }
+ binmode(MAIL, ":utf8") if ( $utf8 );
print MAIL $mesg;
close(MAIL);
}
print MAIL $mesg;
close(MAIL);
}