Closed yorkie closed 10 years ago
This file lib/libetpan.js
do not return any api, but in your package.json
, this file is to be written as a main script, that means I can do import libetpan.js
directly by using require('libetpan')
, but the old version of this file don't exports any object, hence that cause us doing the below codes by using this module: mailimap = require('libetpan/lib/imap.js')
.
@yorkie would you be able to use the underlaying C library to encode / decode headers? There are fairly good examples in MailCore2 repository: https://github.com/MailCore/mailcore2/blob/master/src/core/basetypes/MCData.cc#L414
Thanks for this hint, it's very helpful for me because I'm doing this. But it will cost a little bit more time to fulfill this job.
Hi, @dinhviethoa, I'm confused with this branch: https://github.com/MailCore/mailcore2/blob/master/src/core/basetypes/MCData.cc#L457.
Actually I just know how to get an encoded text like ?GB2312?B?xxxxxxxx=?==
or ?UTF-8?Q?ABC_D=D8
, Now the above 2 cases is work well and support multiple encodings with libiconv
, but I don't get a sample of the UUEncode
, then could you tell me more about this?
Sorry about that I'm also quit new to this.
Data::decodedDataUsingEncoding() will decode a MIME encoded data to a string.
The following methods will encode a string to MIME encoded data: String::encodedMIMEHeaderValue() String::encodedMIMEHeaderValueForSubject() in https://github.com/MailCore/mailcore2/blob/master/src/core/basetypes/MCString.cc
Thanks for your help, I have sent a new PR to this project.
Hi Yorkie, I'm quite new to node.js but I was kind of sure I already tested include of libetpan.js and use of the API. Could you add more description of the issue? I'll be happy to merge this patch if it makes sense.