
org.jresearch.commons.base.mail.IMailService Maven / Gradle / Ivy
The newest version!
package org.jresearch.commons.base.mail;
import javax.annotation.Nonnull;
/**
* Service to send e-mails
*
* @author kot
*
*/
public interface IMailService {
/**
* Sends the mail
*
* @param to
* - recipient e-mail
* @param message
* - message content
* @param subject
* - message subject
*/
void sendMessage(@Nonnull String to, String subject, String message);
/**
* Sends the unexpected and other exception to program supporters
*
* @param error
* - some explanation (may be null
)
*
* @param exception
* - exception to send (may be null
)
*/
void sendError(String error, Throwable exception);
MailServisState getServiceState();
IMailSettings getConfiguration();
void setConfiguration(IMailSettings settings);
/**
* Checks the current mail service configuration
*
* @return null
if configuration correct or some String with
* problem explanation.
*/
String checkMailService();
/**
* Disables the mail service
*/
void disable();
/**
* Enables the mail service
*/
void enable();
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy