Class GreenMailConfiguration
java.lang.Object
com.icegreen.greenmail.configuration.GreenMailConfiguration
Properties that can be defined to configure a GreenMail instance or GreenMailRule.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic GreenMailConfigurationaConfig()Gets preload directory value or null if not set.booleanChecks if preload directory value exists.booleanbooleanDisables authentication.withPreloadDir(String preloadDir) Configures directory path for preloading emails from filesystem.Enables Sieve detail handling, also known as RFC 5233 sub-address extension.The givenGreenMailUserwill be created when servers will start.The givenGreenMailUserwill be created when servers will start.
-
Constructor Details
-
GreenMailConfiguration
public GreenMailConfiguration()
-
-
Method Details
-
withUser
The givenGreenMailUserwill be created when servers will start.- Parameters:
login- User id and email addresspassword- Password of user that belongs to login name- Returns:
- Modified configuration
-
withUser
The givenGreenMailUserwill be created when servers will start.- Parameters:
email- Email addresslogin- Login name of userpassword- Password of user that belongs to login name- Returns:
- Modified configuration
-
aConfig
- Returns:
- New GreenMail configuration
-
getUsersToCreate
- Returns:
- Users that should be created on server startup
-
withDisabledAuthentication
Disables authentication.Useful if you want to avoid setting up users up front.
- Returns:
- Modified configuration.
-
isAuthenticationDisabled
public boolean isAuthenticationDisabled()- Returns:
- true, if authentication is disabled.
- See Also:
-
withSieveIgnoreDetail
Enables Sieve detail handling, also known as RFC 5233 sub-address extension.- Returns:
- Modified configuration.
-
isSieveIgnoreDetailEnabled
public boolean isSieveIgnoreDetailEnabled()- Returns:
- true, if Sieve detail handling is enabled.
- See Also:
-
withPreloadDir
Configures directory path for preloading emails from filesystem.- Parameters:
preloadDir- directory containing emails- Returns:
- Modified configuration.
- See Also:
-
getPreloadDir
Gets preload directory value or null if not set.- Returns:
- the directory
-
hasPreloadDir
public boolean hasPreloadDir()Checks if preload directory value exists.- Returns:
- true if available
-