Revision 3d779763
Von Moritz Bunkus vor fast 18 Jahren hinzugefügt
SL/Form.pm | ||
---|---|---|
839 | 839 |
|
840 | 840 |
} else { |
841 | 841 |
|
842 |
@{ $mail->{attachments} } = ($self->{tmpfile}) unless ($self->{do_not_attach}); |
|
842 |
if (!$self->{"do_not_attach"}) { |
|
843 |
@{ $mail->{attachments} } = |
|
844 |
({ "filename" => $self->{"tmpfile"}, |
|
845 |
"name" => $self->{"attachment_filename"} ? |
|
846 |
$self->{"attachment_filename"} : $self->{"tmpfile"} }); |
|
847 |
} |
|
843 | 848 |
|
844 | 849 |
$mail->{message} =~ s/\r\n/\n/g; |
845 | 850 |
$myconfig->{signature} =~ s/\\n/\n/g; |
SL/Mailer.pm | ||
---|---|---|
147 | 147 |
|
148 | 148 |
foreach my $attachment (@{ $self->{attachments} }) { |
149 | 149 |
|
150 |
my $filename; |
|
151 |
|
|
152 |
if (ref($attachment) eq "HASH") { |
|
153 |
$filename = $attachment->{"name"}; |
|
154 |
$attachment = $attachment->{"filename"}; |
|
155 |
} else { |
|
156 |
$filename = $attachment; |
|
157 |
# strip path |
|
158 |
$filename =~ s/(.*\/|$self->{fileid})//g; |
|
159 |
} |
|
160 |
|
|
150 | 161 |
my $application = |
151 | 162 |
($attachment =~ /(^\w+$)|\.(html|text|txt|sql)$/) |
152 | 163 |
? "text" |
... | ... | |
159 | 170 |
return "$attachment : $!"; |
160 | 171 |
} |
161 | 172 |
|
162 |
my $filename = $attachment; |
|
163 |
|
|
164 |
# strip path |
|
165 |
$filename =~ s/(.*\/|$self->{fileid})//g; |
|
166 |
|
|
167 | 173 |
print OUT qq|--${boundary} |
168 | 174 |
Content-Type: $application/$self->{format}; name="$filename"; charset="$self->{charset}" |
169 | 175 |
Content-Transfer-Encoding: BASE64 |
Auch abrufbar als: Unified diff
Möglichkeit eingebaut, den Namen des Anhangs einer verschickten Mail anzugeben.