chadxz / imap-simple

Wrapper over node-imap, providing a simpler api for common use cases
MIT License
243 stars 80 forks source link

Append to box, with UTF-8 not working #57

Closed rostopira closed 5 years ago

rostopira commented 5 years ago

I have a script, that put's email to inbox from http request It must accept all characters, but I'm getting question marks instead of unicode chars

    let connection = await imap.connect(config);
    let msg = `Content-Type: text/plain; charset=utf-8
From: ${from}
To: [REDACTED]
Subject: Support

${message}

---------------------------------------
UserID: ${uid}`;
    console.log(msg);
    await connection.append(utf8.encode(msg), {mailbox: 'INBOX'});
    connection.end();
rostopira commented 5 years ago

This code actually working, I was calling script in wrong environment Sorry