Class POP3ExportMbox
java.lang.Object
org.apache.commons.net.examples.mail.POP3ExportMbox
This is an example program demonstrating how to use the POP3[S]Client class. This program connects to a POP3[S] server and writes the messages to an mbox
file.
The code currently assumes that POP3Client decodes the POP3 data as iso-8859-1. The POP3 standard only allows for ASCII so in theory iso-8859-1 should be OK. However, it appears that actual POP3 implementations may return 8bit data that is outside the ASCII range; this may result in loss of data when the mailbox is created.
See main() method for usage details
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidprivate static booleanstartsWith(String input, Pattern pat) private static voidwriteFile(POP3Client pop3, OutputStreamWriter fw, int i) private static voidwriteMbox(POP3Client pop3, OutputStreamWriter fw, int i)
-
Field Details
-
PATFROM
-
-
Constructor Details
-
POP3ExportMbox
public POP3ExportMbox()
-
-
Method Details
-
main
-
startsWith
-
writeFile
- Throws:
IOException
-
writeMbox
- Throws:
IOException
-