Smtp Class
- java.
lang. Object - com.
azure. resourcemanager. dashboard. models. Smtp
- com.
Implements
public final class Smtp
implements JsonSerializable<Smtp>
Email server settings. https://grafana.com/docs/grafana/v9.0/setup-grafana/configure-grafana/\#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 from |
| static Smtp |
fromJson(JsonReader jsonReader)
Reads an instance of Smtp from the Json |
| String |
fromName()
Get the from |
| String |
host()
Get the host property: SMTP server hostname with port, e. |
| String |
password()
Get the password property: Password of SMTP auth. |
| Boolean |
skipVerify()
Get the skip |
|
Start |
startTlsPolicy()
Get the start |
|
Json |
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 from |
| Smtp |
withFromName(String fromName)
Set the from |
| Smtp |
withHost(String host)
Set the host property: SMTP server hostname with port, e. |
| Smtp |
withPassword(String password)
Set the password property: Password of SMTP auth. |
| Smtp |
withSkipVerify(Boolean skipVerify)
Set the skip |
| Smtp |
withStartTlsPolicy(StartTlsPolicy startTlsPolicy)
Set the start |
| 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:
fromAddress
public String fromAddress()
Get the fromAddress property: Address used when sending out emails https://pkg.go.dev/net/mail\#Address.
Returns:
fromJson
public static Smtp fromJson(JsonReader jsonReader)
Reads an instance of Smtp from the JsonReader.
Parameters:
Returns:
Throws:
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:
host
public String host()
Get the host property: SMTP server hostname with port, e.g. test.email.net:587.
Returns:
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:
skipVerify
public Boolean skipVerify()
Get the skipVerify property: Verify SSL for SMTP server. Default is false https://pkg.go.dev/crypto/tls\#Config.
Returns:
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:
toJson
user
public String user()
Get the user property: User of SMTP auth.
Returns:
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:
Returns:
withFromAddress
public Smtp withFromAddress(String fromAddress)
Set the fromAddress property: Address used when sending out emails https://pkg.go.dev/net/mail\#Address.
Parameters:
Returns:
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:
Returns:
withHost
public Smtp withHost(String host)
Set the host property: SMTP server hostname with port, e.g. test.email.net:587.
Parameters:
Returns:
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:
Returns:
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:
Returns:
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:
Returns:
withUser
public Smtp withUser(String user)
Set the user property: User of SMTP auth.
Parameters:
Returns: