Enough-Software / enough_mail

IMAP, POP3 and SMTP clients for Dart developers. Contains both low level as well as a high level API.
Mozilla Public License 2.0
105 stars 55 forks source link

limited number of text in message? #219

Open kotran88 opened 1 year ago

kotran88 commented 1 year ago

I have long line of message and seems that it has some limit of reading message.

is it true? how can I read all message content? I just use sample function but it has limit in reading all text

like below I can't see all html code of my email's content

<!DOCTYPE html><bo


  void printMessage(MimeMessage message) {
    print('from: ${message.from} with subject "${message.decodeSubject()}" , ');
    if (!message.isTextPlainMessage()) {
      print(' content-type: ${message.mediaType}');
      print(message.decodeTextPlainPart());
      print(message.body);
      print(message.decodeContentMessage());
      print("11111");
      print(message.decodeContentText());
      print("2222");
      print(message.decodeTextHtmlPart());
      print("333");
      print(message.toString());
    } else {
      final plainText = message.decodeTextPlainPart();
      if (plainText != null) {
        final lines = plainText.split('\r\n');
        for (final line in lines) {
          if (line.startsWith('>')) {
            // break when quoted text starts
            break;
          }
          print(line);
        }
      }
    }
  }

seems like on decodeTextPlainPart function, I can read long line of message but with some emaiil, decodeTextPlainPart is null so I should try decodeContentText() and with this function, I have content is limited to show .

robert-virkus commented 1 year ago

How do run your code? The print method truncates output after a couple of lines - at least in the debug output window.