• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to get email size ?

 
wenjunxiang
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,all
I want to receive mail without using Javamail
just Use pop3 protocol

I found use "stat " command cannot get the actual
email size? how can i get email size?
 
Van Glass
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm pretty sure you can't do this using POP3 commands. The easiest way to do this would probably be to read the contents of the message into a buffer and read the length of the buffer.
 
Van Glass
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
After further research I found that you can do this using the LIST [msgid] command where [msgid] is the unique ID of the message. Messages are 1 based with the first message having an id of 1 second of 2 and so on. The result of the command will return the message size in bytes.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!