Revision cf316195
Von Tamino Steinert vor 7 Monaten hinzugefügt
- ID cf3161957a571b2bc04c1ccbc2f644b90db45cc0
- Vorgänger 27893755
SL/IMAPClient.pm | ||
---|---|---|
273 | 273 |
); |
274 | 274 |
my @accepted_text_content_types = ('text/html', 'text/plain', ''); |
275 | 275 |
$text_part ||= $text_parts{$_} for @accepted_text_content_types; |
276 |
confess "can't find body text in email" unless $text_part; |
|
277 |
my $body_text = $text_part->body_str; |
|
276 |
my $body_text = $text_part ? $text_part->body_str : ''; |
|
278 | 277 |
|
279 | 278 |
my %header_map = map { $_ => $email->header_str($_) } $email->header_names; |
280 | 279 |
# We need to store the Content-Type header for the text part |
281 |
$header_map{'Content-Type'} = $text_part->content_type;
|
|
280 |
$header_map{'Content-Type'} = $text_part ? $text_part->content_type : 'text/plain';
|
|
282 | 281 |
my $header_string = join "\r\n", |
283 | 282 |
(map { $_ . ': ' . $header_map{$_} } keys %header_map); |
284 | 283 |
|
Auch abrufbar als: Unified diff
S:IMAPClient: erlaube E-Mails ohne Text-Teil