Package io.micronaut.email.postmark
Class PostmarkConfigurationProperties
java.lang.Object
io.micronaut.email.postmark.PostmarkConfigurationProperties
- All Implemented Interfaces:
io.micronaut.core.util.Toggleable,PostmarkConfiguration
@Requires(property="postmark.api-token")
@ConfigurationProperties("postmark")
public class PostmarkConfigurationProperties
extends Object
implements PostmarkConfiguration
ConfigurationProperties implementation of PostmarkConfiguration.- Since:
- 1.0.0
- Author:
- Sergio del Amo
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final booleanThe default enable value.static final booleanThe default track opens value.static final Stringpostmark prefix. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@NonNull String@NonNull TrackLinksbooleanbooleanvoidsetApiToken(@NonNull String apiToken) Postmark API token.voidsetEnabled(boolean enabled) If Postmark integration is enabled.voidsetTrackLinks(@NonNull TrackLinks trackLinks) Whether to track the email's links.voidsetTrackOpens(boolean trackOpens) Whether to track if the email is opened.
-
Field Details
-
PREFIX
postmark prefix.- See Also:
-
DEFAULT_ENABLED
public static final boolean DEFAULT_ENABLEDThe default enable value.- See Also:
-
DEFAULT_TRACK_OPENS
public static final boolean DEFAULT_TRACK_OPENSThe default track opens value.- See Also:
-
-
Constructor Details
-
PostmarkConfigurationProperties
public PostmarkConfigurationProperties()
-
-
Method Details
-
isEnabled
public boolean isEnabled()- Specified by:
isEnabledin interfaceio.micronaut.core.util.Toggleable
-
setEnabled
public void setEnabled(boolean enabled) If Postmark integration is enabled. Default value: `true`- Parameters:
enabled- True if security is enabled
-
getApiToken
- Specified by:
getApiTokenin interfacePostmarkConfiguration- Returns:
- Postmark API token.
-
setApiToken
Postmark API token.- Parameters:
apiToken- Postmark API token.
-
setTrackOpens
public void setTrackOpens(boolean trackOpens) Whether to track if the email is opened. Default value: `false`- Parameters:
trackOpens- Whether to track if the email is opened
-
setTrackLinks
Whether to track the email's links. Default value DO_NOT_TRACK.- Parameters:
trackLinks- Whether to track the email's links
-
getTrackOpens
public boolean getTrackOpens()- Specified by:
getTrackOpensin interfacePostmarkConfiguration- Returns:
- Whether to track if the email is opened
-
getTrackLinks
- Specified by:
getTrackLinksin interfacePostmarkConfiguration- Returns:
- Whether to track the email's links
-