I am trying to understand how can I get gmail labels (x-gm-labels) for an email in C.
I checked, that builds of libetpan support x-gm-labels extension.
Any idea how to write a sample code to put it all together?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Got it. From tracing this check-in from the original author, I discovered the code welded into the default handling behavior of libetpan‘s IMAP support.
Well, it turns out the author provides an example of how to set up an IMAP connection successfully. Instead of spooling out all of the code, here’s the bit you should be concerned with:
According to my backtrace of the code, your ticket is
struct mailimap_msg_att_item. Theatt_typeyou’re looking for here isMAILIMAP_MSG_ATT_ITEM_EXTENSION, and from there, you should walk the data structures until you findMAILIMAP_EXTENSION_XGMLABELS.Something like this should isolate them:
(Warning: untested code.)
From here, you can perform more deeply interrogative inspection of the structs being used. The salient files are all contained in
src/low-level/imap, except for the test file. Good luck!