I am fetching the size of message using following IMAP command.
"$ FETCH UID RFC822.SIZE\r\n"
For some messages the command works properly and returns the message size
"* 3 FETCH (RFC822.SIZE 2376)\r\n$ OK Success\r\n"
But for some emails its not fetching the size of message. It returns only Success message but not the size
Here is the response for some messages.
"$ OK Success\r\n"
Is there any alternative way for fetching the size of message?
$ FETCH N RFC822.SIZE\r\nwill fetch the size of the Nth message in the mailbox, not the message with a UID of N. If you want to fetch based on UID, then you need to useUID FETCH N RFC822.SIZE\r\n- jstedfast