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

com.github.bloodshura.sparkium.mail.guerrilla.GuerrillaEmail 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.guerrilla;

import com.github.bloodshura.ignitium.object.Base;

import javax.annotation.Nonnull;
import java.time.LocalDateTime;

public class GuerrillaEmail extends Base {
	private final String address;
	private final LocalDateTime creationTime;
	private final LocalDateTime expirationTime;

	public GuerrillaEmail(@Nonnull String address, @Nonnull LocalDateTime creationTime) {
		this.address = address;
		this.creationTime = creationTime;
		this.expirationTime = LocalDateTime.of(creationTime.toLocalDate(), creationTime.toLocalTime().plusHours(1));
	}

	@Nonnull
	public String getAddress() {
		return address;
	}

	@Nonnull
	public LocalDateTime getCreationTime() {
		return creationTime;
	}

	@Nonnull
	public LocalDateTime getExpirationTime() {
		return expirationTime;
	}

	@Nonnull
	@Override
	protected Object[] stringValues() {
		return new Object[] { getAddress(), getCreationTime(), getExpirationTime() };
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy