StartTlsPolicy Class

public final class StartTlsPolicy
extends ExpandableStringEnum<StartTlsPolicy>

The StartTLSPolicy setting of the SMTP configuration https://pkg.go.dev/github.com/go-mail/mail\#StartTLSPolicy.

Field Summary

Modifier and Type Field and Description
static final StartTlsPolicy MANDATORY_START_TLS

Static value MandatoryStartTLS for StartTlsPolicy.

static final StartTlsPolicy NO_START_TLS

Static value NoStartTLS for StartTlsPolicy.

static final StartTlsPolicy OPPORTUNISTIC_START_TLS

Static value OpportunisticStartTLS for StartTlsPolicy.

Constructor Summary

Constructor Description
StartTlsPolicy()

Deprecated

Use the fromString(String name) factory method.

Creates a new instance of StartTlsPolicy value.

Method Summary

Modifier and Type Method and Description
static StartTlsPolicy fromString(String name)

Creates or finds a StartTlsPolicy from its string representation.

static Collection<StartTlsPolicy> values()

Gets known StartTlsPolicy values.

Methods inherited from ExpandableStringEnum

Methods inherited from java.lang.Object

Field Details

MANDATORY_START_TLS

public static final StartTlsPolicy MANDATORY_START_TLS

Static value MandatoryStartTLS for StartTlsPolicy.

NO_START_TLS

public static final StartTlsPolicy NO_START_TLS

Static value NoStartTLS for StartTlsPolicy.

OPPORTUNISTIC_START_TLS

public static final StartTlsPolicy OPPORTUNISTIC_START_TLS

Static value OpportunisticStartTLS for StartTlsPolicy.

Constructor Details

StartTlsPolicy

@Deprecated
public StartTlsPolicy()

Deprecated

Use the fromString(String name) factory method.

Creates a new instance of StartTlsPolicy value.

Method Details

fromString

public static StartTlsPolicy fromString(String name)

Creates or finds a StartTlsPolicy from its string representation.

Parameters:

name - a name to look for.

Returns:

the corresponding StartTlsPolicy.

values

public static Collection<StartTlsPolicy> values()

Gets known StartTlsPolicy values.

Returns:

known StartTlsPolicy values.

Applies to