Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

limited number of text in message? #219

Open
kotran88 opened this issue Apr 26, 2023 · 1 comment
Open

limited number of text in message? #219

kotran88 opened this issue Apr 26, 2023 · 1 comment

Comments

@kotran88
Copy link

kotran88 commented Apr 26, 2023

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

<style>@media only screen and (max-width:640px) {.stb-container {}.stb-left-cell,.stb-right-cell {max-width: 100% !important;width: 100% !important;box-sizing: border-box;}.stb-image-box td {text-align: center;}.stb-image-box td img {width: 100%;}.stb-block {width: 100%!important;}table.stb-cell {width: 100%!important;}.stb-cell td,.stb-left-cell td,.stb-right-cell td {width: 100%!important;}img.stb-justify {width: 100%!important;}}.stb-left-cell p,.stb-right-cell p {margin: 0!important;}.stb-container table.munged {width: 100% !important; table-layout: auto !important; } .stb-container td.munged {width: 100% !important; white-space: normal !important;} </style> 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
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants