Smtp Class

  • java.lang.Object
    • com.azure.resourcemanager.dashboard.models.Smtp

Implements

public final class Smtp
implements JsonSerializable<Smtp>

Constructor Summary

Constructor Description
Smtp()

Creates an instance of Smtp class.

Method Summary

Modifier and Type Method and Description
Boolean enabled()

Get the enabled property: Enable this to allow Grafana to send email.

String fromAddress()

Get the fromAddress property: Address used when sending out emails https://pkg.go.dev/net/mail#Address.

static Smtp fromJson(JsonReader jsonReader)

Reads an instance of Smtp from the JsonReader.

String fromName()

Get the fromName property: Name to be used when sending out emails.

String host()

Get the host property: SMTP server hostname with port, e.g.

String password()

Get the password property: Password of SMTP auth.

Boolean skipVerify()

Get the skipVerify property: Verify SSL for SMTP server.

StartTlsPolicy startTlsPolicy()

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

JsonWriter toJson(JsonWriter jsonWriter)
String user()

Get the user property: User of SMTP auth.

void validate()

Validates the instance.

Smtp withEnabled(Boolean enabled)

Set the enabled property: Enable this to allow Grafana to send email.

Smtp withFromAddress(String fromAddress)

Set the fromAddress property: Address used when sending out emails https://pkg.go.dev/net/mail#Address.

Smtp withFromName(String fromName)

Set the fromName property: Name to be used when sending out emails.

Smtp withHost(String host)

Set the host property: SMTP server hostname with port, e.g.

Smtp withPassword(String password)

Set the password property: Password of SMTP auth.

Smtp withSkipVerify(Boolean skipVerify)

Set the skipVerify property: Verify SSL for SMTP server.

Smtp withStartTlsPolicy(StartTlsPolicy startTlsPolicy)

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

Smtp withUser(String user)

Set the user property: User of SMTP auth.

Methods inherited from java.lang.Object

Constructor Details

Smtp

public Smtp()

Creates an instance of Smtp class.

Method Details

enabled

public Boolean enabled()

Get the enabled property: Enable this to allow Grafana to send email. Default is false.

Returns:

the enabled value.

fromAddress

public String fromAddress()

Get the fromAddress property: Address used when sending out emails https://pkg.go.dev/net/mail\#Address.

Returns:

the fromAddress value.

fromJson

public static Smtp fromJson(JsonReader jsonReader)

Reads an instance of Smtp from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of Smtp if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If an error occurs while reading the Smtp.

fromName

public String fromName()

Get the fromName property: Name to be used when sending out emails. Default is "Azure Managed Grafana Notification" https://pkg.go.dev/net/mail\#Address.

Returns:

the fromName value.

host

public String host()

Get the host property: SMTP server hostname with port, e.g. test.email.net:587.

Returns:

the host value.

password

public String password()

Get the password property: Password of SMTP auth. If the password contains # or ;, then you have to wrap it with triple quotes.

Returns:

the password value.

skipVerify

public Boolean skipVerify()

Get the skipVerify property: Verify SSL for SMTP server. Default is false https://pkg.go.dev/crypto/tls\#Config.

Returns:

the skipVerify value.

startTlsPolicy

public StartTlsPolicy startTlsPolicy()

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

Returns:

the startTlsPolicy value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

user

public String user()

Get the user property: User of SMTP auth.

Returns:

the user value.

validate

public void validate()

Validates the instance.

withEnabled

public Smtp withEnabled(Boolean enabled)

Set the enabled property: Enable this to allow Grafana to send email. Default is false.

Parameters:

enabled - the enabled value to set.

Returns:

the Smtp object itself.

withFromAddress

public Smtp withFromAddress(String fromAddress)

Set the fromAddress property: Address used when sending out emails https://pkg.go.dev/net/mail\#Address.

Parameters:

fromAddress - the fromAddress value to set.

Returns:

the Smtp object itself.

withFromName

public Smtp withFromName(String fromName)

Set the fromName property: Name to be used when sending out emails. Default is "Azure Managed Grafana Notification" https://pkg.go.dev/net/mail\#Address.

Parameters:

fromName - the fromName value to set.

Returns:

the Smtp object itself.

withHost

public Smtp withHost(String host)

Set the host property: SMTP server hostname with port, e.g. test.email.net:587.

Parameters:

host - the host value to set.

Returns:

the Smtp object itself.

withPassword

public Smtp withPassword(String password)

Set the password property: Password of SMTP auth. If the password contains # or ;, then you have to wrap it with triple quotes.

Parameters:

password - the password value to set.

Returns:

the Smtp object itself.

withSkipVerify

public Smtp withSkipVerify(Boolean skipVerify)

Set the skipVerify property: Verify SSL for SMTP server. Default is false https://pkg.go.dev/crypto/tls\#Config.

Parameters:

skipVerify - the skipVerify value to set.

Returns:

the Smtp object itself.

withStartTlsPolicy

public Smtp withStartTlsPolicy(StartTlsPolicy startTlsPolicy)

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

Parameters:

startTlsPolicy - the startTlsPolicy value to set.

Returns:

the Smtp object itself.

withUser

public Smtp withUser(String user)

Set the user property: User of SMTP auth.

Parameters:

user - the user value to set.

Returns:

the Smtp object itself.

Applies to