Package de.xima.fc.mail
Class MailSendUtil
- java.lang.Object
- 
- de.xima.fc.mail.MailSendUtil
 
- 
 public final class MailSendUtil extends Object Utility class for sending mail.
- 
- 
Method SummaryAll Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static voidsend(MandantMailData data, IBaseMailData mail)Sends a mail or mails, using the client email server when available or the system mail server otherwise.static voidsend(Mandant client, IBaseMailData mail)Sends a mail or mails, using the email server of the client when available, or the system email server otherwise.static voidsend(IMailServerData serverData, IBaseMailData mail)Sends a mail or mails based on the server data and mail datastatic voidsend(String server, Integer port, javax.mail.Authenticator auth, EMailEncryption encryption, boolean allowUtf8, IBaseMailData mail)Deprecated.static voidsend(String server, Integer port, javax.mail.Authenticator auth, EMailEncryption encryption, IBaseMailData mail)Deprecated.static ISendMailReportsendWithReport(MandantMailData data, IBaseMailData mail)Sends a mail or mails, using the client email server when available or the system mail server otherwise.static ISendMailReportsendWithReport(Mandant client, IBaseMailData mail)Sends a mail or mails, using the email server of the client when available, or the system email server otherwise.static ISendMailReportsendWithReport(IMailServerData serverData, IBaseMailData mail)Sends a mail or mails based on the server data and mail data
 
- 
- 
- 
Method Detail- 
sendpublic static void send(IMailServerData serverData, IBaseMailData mail) throws Exception Sends a mail or mails based on the server data and mail data- Parameters:
- serverData- The data of the mail server.
- mail- The data of the mail to send.
- Throws:
- Exception- When the email cannot be sent, such as when an email address is invalid, the network is not available etc.
 
 - 
sendpublic static void send(Mandant client, IBaseMailData mail) throws Exception Sends a mail or mails, using the email server of the client when available, or the system email server otherwise.- Parameters:
- client- Client with a mail server to use. When- nullor unavailable, uses the system mail server configuration.
- mail- Data of the mail to send.
- Throws:
- MailContextNotAvailableException- When neither a client mail server nor a system mail server is available.
- Exception- When the email cannot be sent, such as when an email address is invalid, the network is not available etc.
 
 - 
sendpublic static void send(MandantMailData data, IBaseMailData mail) throws Exception Sends a mail or mails, using the client email server when available or the system mail server otherwise.- Parameters:
- data- Data regarding the client mail server to use. When- nullor not available, uses the system mail server configuration.
- mail- Data with the mail to send.
- Throws:
- MailContextNotAvailableException- When neither a client mail server nor a system mail server is available.
- Exception- When the email cannot be sent, such as when an email address is invalid, the network is not available etc.
 
 - 
send@Deprecated public static void send(String server, Integer port, javax.mail.Authenticator auth, EMailEncryption encryption, boolean allowUtf8, IBaseMailData mail) throws Exception Deprecated.Sends email(s) via the given mail server.- Parameters:
- server- Address of the mail server.
- port- Port of the mail sever. Must not be- null.
- auth- Authenticator when required, may be- null.
- encryption- Email encryption method to use.
- allowUtf8- Whether the mail server support UTF-8 message headers.
- mail- Email to send.
- Throws:
- MailContextNotAvailableException- When the given mail server configuration is invalid.
- Exception- When the email cannot be sent, such as when an email address is invalid, the network is not available etc.
 
 - 
send@Deprecated public static void send(String server, Integer port, javax.mail.Authenticator auth, EMailEncryption encryption, IBaseMailData mail) throws Exception Deprecated.Sends email(s) via the given mail server.- Parameters:
- server- Address of the mail server.
- port- Port of the mail sever. Must not be- null.
- auth- Authenticator when required, may be- null.
- encryption- Email encryption method to use.
- mail- Email to send.
- Throws:
- MailContextNotAvailableException- When the given mail server configuration is invalid.
- Exception- When the email cannot be sent, such as when an email address is invalid, the network is not available etc.
 
 - 
sendWithReportpublic static ISendMailReport sendWithReport(IMailServerData serverData, IBaseMailData mail) throws Exception Sends a mail or mails based on the server data and mail data- Parameters:
- serverData- The data of the mail server.
- mail- The data of the mail to send.
- Returns:
- Information about the mails that were actually sent.
- Throws:
- Exception- When the email cannot be sent, such as when an email address is invalid, the network is not available etc.
 
 - 
sendWithReportpublic static ISendMailReport sendWithReport(Mandant client, IBaseMailData mail) throws Exception Sends a mail or mails, using the email server of the client when available, or the system email server otherwise.- Parameters:
- client- Client with a mail server to use. When- nullor unavailable, uses the system mail server configuration.
- mail- Data of the mail to send.
- Returns:
- Information about the mails that were actually sent.
- Throws:
- MailContextNotAvailableException- When neither a client mail server nor a system mail server is available.
- Exception- When the email cannot be sent, such as when an email address is invalid, the network is not available etc.
 
 - 
sendWithReportpublic static ISendMailReport sendWithReport(MandantMailData data, IBaseMailData mail) throws Exception Sends a mail or mails, using the client email server when available or the system mail server otherwise.- Parameters:
- data- Data regarding the client mail server to use. When- nullor not available, uses the system mail server configuration.
- mail- Data with the mail to send.
- Returns:
- Information about the mails that were actually sent.
- Throws:
- MailContextNotAvailableException- When neither a client mail server nor a system mail server is available.
- Exception- When the email cannot be sent, such as when an email address is invalid, the network is not available etc.
 
 
- 
 
-