Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 9dc7e74d

Von Tamino Steinert vor etwa 1 Monat hinzugefügt

S:IMAPClient: erlaube E-Mails ohne Text-Teil

Unterschiede anzeigen:

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