Closed kztmk closed 5 years ago
Please tell me how can I get message to show using browser.
I got mimeNodes successfully, but I do not find how to restructure the message.
import imapClient from 'emailjs-imap-client'; import parse from 'emailjs-mime-parser';
const imapClietnt = new (host, port { auth: {user: userName, pass: password}}); imapClient.connect();
const messages = imapClient.lestMessages('INBOX', '1' ['uid', 'flags', 'body.peek[]']);
const myMimeNodes = parse(messages[0]['body[]'])
In case of multipart message, myMimeNodes like as follows.
-- myMimeNodes -- -- bodystructure: string -- -- contentType -- -- -- type: multipart -- -- -- params -- -- -- -- boundary: string -- -- childNodes: Array -- -- -- MimeNode -- -- -- -- content: Uint8Array
So how can I get readable text or html?
The unit tests provide a good example of how to use it:
https://github.com/emailjs/emailjs-mime-parser/blob/master/src/mimeparser-unit.js
Please tell me how can I get message to show using browser.
I got mimeNodes successfully, but I do not find how to restructure the message.
import imapClient from 'emailjs-imap-client'; import parse from 'emailjs-mime-parser';
const imapClietnt = new (host, port { auth: {user: userName, pass: password}}); imapClient.connect();
const messages = imapClient.lestMessages('INBOX', '1' ['uid', 'flags', 'body.peek[]']);
const myMimeNodes = parse(messages[0]['body[]'])
In case of multipart message, myMimeNodes like as follows.
-- myMimeNodes -- -- bodystructure: string -- -- contentType -- -- -- type: multipart -- -- -- params -- -- -- -- boundary: string -- -- childNodes: Array -- -- -- MimeNode -- -- -- -- content: Uint8Array
So how can I get readable text or html?