com.icegreen.greenmail.util.UserUtil Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of greenmail Show documentation
Show all versions of greenmail Show documentation
GreenMail - Email Test Servers
package com.icegreen.greenmail.util;
import com.icegreen.greenmail.base.GreenMailOperations;
import jakarta.mail.internet.InternetAddress;
/**
* Utility for managing users
*/
public final class UserUtil {
/**
* No instance
*/
private UserUtil() {
}
/**
* Create users for the given array of addresses. The passwords will be set to the email addresses.
*
* @param greenMail Greenmail instance to create users for
* @param addresses Addresses
*/
public static void createUsers(GreenMailOperations greenMail, InternetAddress... addresses) {
for (InternetAddress address : addresses) {
greenMail.setUser(address.getAddress(), address.getAddress());
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy