Class SmtpMailConfigurationSection
- Namespace
- NuvTools.Notification.Mail.Smtp.Configuration
- Assembly
- NuvTools.Notification.Mail.Smtp.dll
Contains the SMTP configuration that should be loaded from appsettings file.
The default section name is "MailSmtp"
public class SmtpMailConfigurationSection : MailConfigurationSection
- Inheritance
-
SmtpMailConfigurationSection
- Inherited Members
Remarks
Extends MailConfigurationSection with the SMTP server settings, inheriting the shared sender defaults.
Properties
AllowInvalidCertificates
Gets or sets a value indicating whether the server TLS certificate is accepted without validation.
Defaults to false.
public bool AllowInvalidCertificates { get; set; }
Property Value
Remarks
Enabling this option disables certificate chain, name and expiration checks, which exposes the connection — and therefore the credentials sent over it — to man-in-the-middle attacks.
Intended only for development environments with self-signed certificates. Never enable it in production.
Host
Gets or sets the SMTP server hostname or IP address.
public required string Host { get; set; }
Property Value
Password
Gets or sets the password for SMTP authentication.
public required string Password { get; set; }
Property Value
Port
Gets or sets the SMTP server port number (e.g., 25, 587, or 465).
public int Port { get; set; }
Property Value
UserName
Gets or sets the username for SMTP authentication.
public required string UserName { get; set; }