SmtpClient constructor
SmtpClient(
- String clientDomain, {
- bool isLogEnabled = false,
- String? logName,
- bool onBadCertificate()?,
- SecurityContext? securityContext,
Creates a new instance with the specified clientDomain
that is associated with your service's domain,
e.g. domain.com or enough.de.
Set isLogEnabled to true to see log output.
Set the logName for adding the name to each log entry.
onBadCertificate is an optional handler for unverifiable certificates.
The handler receives the X509Certificate, and can inspect it and
decide (or let the user decide) whether to accept the connection or not.
The handler should return true to continue the SecureSocket connection.
securityContext is an optional SecurityContext for mTLS
(mutual TLS / client certificate authentication).
Implementation
SmtpClient(
String clientDomain, {
bool isLogEnabled = false,
String? logName,
bool Function(X509Certificate)? onBadCertificate,
SecurityContext? securityContext,
}) : _clientDomain = clientDomain,
super(
isLogEnabled: isLogEnabled,
logName: logName,
onBadCertificate: onBadCertificate,
securityContext: securityContext,
);