public class MailProvider
extends java.lang.Object
Please check Nuclos system parameter for setting connection parameter like POP3/SMTP
Constructor and Description |
---|
MailProvider() |
Modifier and Type | Method and Description |
---|---|
static java.util.List<NuclosMail> |
receive(boolean bDeleteMails)
This method retrieves all
NuclosMail s that can be found in the Inbox
of the account mentioned in the system parameters. |
static java.util.List<NuclosMail> |
receive(java.lang.String folderFrom,
boolean bDeleteMails)
This method retrieves all
NuclosMail s that can be found in the specified folder
of the account mentioned in the system parameters. |
static void |
send(java.io.InputStream is)
Takes an email as an .eml from an input stream and sends it.
|
static void |
send(NuclosMail mail)
This method sends a
NuclosMail
All connection settings like POP3/SMTP must be set in Nuclos as system parameters |
void |
setMailService(MailService repService) |
static void |
transformToEml(NuclosMail nuclosMail,
java.io.OutputStream outputStream)
Transforms a
NuclosMail to the EML format and writes it to the specified OutputStream . |
public void setMailService(MailService repService)
public static void send(NuclosMail mail) throws BusinessException
NuclosMail
All connection settings like POP3/SMTP must be set in Nuclos as system parametersmail
- NuclosMail
- email to sendBusinessException
public static void send(java.io.InputStream is) throws BusinessException
is
- - input stream, which holds the email as a .emlBusinessException
- - problem, which occurred while attempting to sendpublic static java.util.List<NuclosMail> receive(boolean bDeleteMails) throws BusinessException
NuclosMail
s that can be found in the Inbox
of the account mentioned in the system parameters.
If argument 'bDeleteMails' is true, all mails will be deleted after retrieving them from the server.
All connection settings like POP3/SMTP must be set in Nuclos as system parameters
bDeleteMails
- - bDeleteMailsNuclosFile
BusinessException
public static java.util.List<NuclosMail> receive(java.lang.String folderFrom, boolean bDeleteMails) throws BusinessException
NuclosMail
s that can be found in the specified folder
of the account mentioned in the system parameters.
Fetching mails from specific folders only works via IMAP. For POP3 the folder is always "INBOX".
If argument 'bDeleteMails' is true, all mails will be deleted after retrieving them from the server.
All connection settings like POP3/SMTP must be set in Nuclos as system parameters
folderFrom
- bDeleteMails
- - bDeleteMailsNuclosFile
BusinessException
public static void transformToEml(NuclosMail nuclosMail, java.io.OutputStream outputStream) throws BusinessException
NuclosMail
to the EML format and writes it to the specified OutputStream
.nuclosMail
- - NuclosMail
, that should be transformedoutputStream
- - OutputStream
, where the EML is written toBusinessException
Copyright © 2024. All rights reserved.