Package de.xima.fc.mail
Class MailArchiveUtils
- java.lang.Object
-
- de.xima.fc.mail.MailArchiveUtils
-
public final class MailArchiveUtils extends Object
Utility class for archiving mail.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
archive(File targetFile, MandantMailData data, IBaseMailData mail, EEmailArchiveFormat format)
Archives an email by writing it to aFile
.
-
-
-
Method Detail
-
archive
public static void archive(File targetFile, MandantMailData data, IBaseMailData mail, EEmailArchiveFormat format) throws MailContextNotAvailableException, ArchiveException, Exception
Archives an email by writing it to aFile
. It's content consist of subject, body, attachments, sender, receiver and date.- Parameters:
targetFile
- The file to write to.data
- Data regarding the client mail server to use. Whennull
or not available, uses the system mail server configuration.mail
- Email to send.format
- The chosen format for the archived mail.- Throws:
MailContextNotAvailableException
- When neither a client mail server nor a system mail server is available.ArchiveException
- When creating theMimeMessage
or writing it to aFile
fails.Exception
- When the archive file could not be created.
-
-