projects
/
kivitendo-erp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fehlendes Zeichen. Fix für Bug 630.
[kivitendo-erp.git]
/
SL
/
Mailer.pm
diff --git
a/SL/Mailer.pm
b/SL/Mailer.pm
index
453603f
..
37d98b7
100644
(file)
--- a/
SL/Mailer.pm
+++ b/
SL/Mailer.pm
@@
-147,6
+147,17
@@
$self->{message}
foreach my $attachment (@{ $self->{attachments} }) {
foreach my $attachment (@{ $self->{attachments} }) {
+ my $filename;
+
+ if (ref($attachment) eq "HASH") {
+ $filename = $attachment->{"name"};
+ $attachment = $attachment->{"filename"};
+ } else {
+ $filename = $attachment;
+ # strip path
+ $filename =~ s/(.*\/|$self->{fileid})//g;
+ }
+
my $application =
($attachment =~ /(^\w+$)|\.(html|text|txt|sql)$/)
? "text"
my $application =
($attachment =~ /(^\w+$)|\.(html|text|txt|sql)$/)
? "text"
@@
-159,11
+170,6
@@
$self->{message}
return "$attachment : $!";
}
return "$attachment : $!";
}
- my $filename = $attachment;
-
- # strip path
- $filename =~ s/(.*\/|$self->{fileid})//g;
-
print OUT qq|--${boundary}
Content-Type: $application/$self->{format}; name="$filename"; charset="$self->{charset}"
Content-Transfer-Encoding: BASE64
print OUT qq|--${boundary}
Content-Type: $application/$self->{format}; name="$filename"; charset="$self->{charset}"
Content-Transfer-Encoding: BASE64