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

com.github.bloodshura.sparkium.mail.component.Account 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.component;

import com.github.bloodshura.ignitium.object.Base;
import com.github.bloodshura.ignitium.security.Password;
import com.github.bloodshura.sparkium.mail.MailException;

import javax.annotation.Nonnull;

public class Account extends Base {
	private final Email email;
	private final Password password;

	public Account(@Nonnull CharSequence email, @Nonnull CharSequence password) throws MailException {
		this(new Email(email), password);
	}

	public Account(@Nonnull Email email, @Nonnull CharSequence password) {
		this(email, password instanceof Password ? (Password) password : new Password(password));
	}

	public Account(@Nonnull Email email, @Nonnull Password password) {
		this.email = email;
		this.password = password;
	}

	@Nonnull
	public Email getEmail() {
		return email;
	}

	@Nonnull
	public Password getPassword() {
		return password;
	}

	@Nonnull
	@Override
	protected Object[] stringValues() {
		return new Object[] { getEmail(), getPassword() };
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy