ios - MailCore2 - Fetch message content without downloading images or attachments? -
i want provide preview of user's messages, don't wish download attachments in order that.
the information need is:
- subject
- date
- sender information (display name if available, email address)
- plain-text message
by calling method fetchmessagesbynumberoperationwithfolder: request kind mcoimapmessagesrequestkindheaders, date , subject, it's slow return if of messages have attachments. calling request kind mcoimapmessagesrequestkinduid, returns quickly, uid (and current date, placeholder). there, still need subject, date , sender.
now i'm still trying information, while avoiding downloading message attachments.
calling fetchparsedmessageoperationwithfolder: or fetchmessageoperationwithfolder: both download message attachments, , slow return.
because fetchmessageoperationwithfolder: completes nsdata object, checking size of given object reveals size of regular message, plus its' attachment.
what can information need, without downloading attachments?
edit: calling requiredpartsforrendering give me content of email, in order retrieve date , sender information, i'd still have have request kind of mcoimapmessagesrequestkindheaders, download attachment.
so clarify:
i want following information imap email, without downloading email attachments:
- subject
- date
- sender information (display name if available, email address)
- plain-text message
the following methods should helpful you:
-[mcoabstractmessage requiredpartsforrendering] return message parts needs fetch able show text content of message.
-[mcoimapsession fetchmessageattachmentoperationwithfolder:uid:partid:encoding:] fetch each of parts.
-[mcoimapmessage htmlrenderingwithfolder:delegate:] return rendered content html (or nil if don't provide content of parts through delegate.
-[nsstring mco_flattenhtml] useful if you'd convert html unformatted string.
Comments
Post a Comment