com.github.bloodshura.sparkium.mail.Mail Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sparkium-mail Show documentation
Show all versions of sparkium-mail Show documentation
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