All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.bloodshura.sparkium.mail.Mail Maven / Gradle / Ivy

Go to download

An API which aims to facilitate the usage of javax.mail, also including other mailing services.

The newest version!
package com.github.bloodshura.sparkium.mail;

import com.github.bloodshura.sparkium.mail.component.Account;
import com.github.bloodshura.sparkium.mail.component.Message;
import com.github.bloodshura.sparkium.mail.component.Recipients;

import javax.annotation.Nonnull;
import javax.annotation.Nullable;

public interface Mail {
	void connect(@Nonnull Account account) throws MailException;

	void disconnect();

	@Nullable
	Account getAccount();

	@Nonnull
	String getIdentifier();

	default boolean isConnected() {
		return getAccount() != null;
	}

	void send(@Nonnull Recipients recipients, @Nonnull Message message) throws MailException;
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy