B4J Question POP.DownloadMessageTop downloads more than specified

ottercat

Member
Licensed User
If I do
POP.DownloadMessageTop(Messages.GetKeyAt(i),5,False)
It will still download the whole message not just the top 5 lines.
 

OliverA

Expert
Licensed User
Longtime User
Could be a configuration on the mail server (out of your hands, unless you're the admin). According to JavaMail API docs:
When the headers of a POP3 message are accessed, the POP3 provider uses the TOP command to fetch all headers, which are then cached. Use of the TOP command can be disabled with the mail.pop3.disabletop property, in which case the entire message content is fetched with the RETR command.
Link: https://javaee.github.io/javamail/docs/api/com/sun/mail/pop3/package-summary.html
 
Upvote 0
Top