Constructor SmtpAccountSettings
- Namespace
- MailFathom.Infrastructure.Mail
- Assembly
- MailFathom.Infrastructure.dll
SmtpAccountSettings(string, string, int, string, MailAccountConnectionMaterial)
Contains validated SMTP endpoint and credential settings for one configured account.
public SmtpAccountSettings(string AccountId, string Host, int Port, string UserName, MailAccountConnectionMaterial Material)
Parameters
AccountIdstringThe normalized local account identifier.
HoststringThe submission server host name.
PortintThe submission server port.
UserNamestringThe submission user name, which stays a plain configuration value because it is an identifier rather than a credential.
MaterialMailAccountConnectionMaterialThe password and trust anchor this account's delivery resolved. This record is a carrier and does not own them: the operation that requested the settings owns the material and must dispose it when it ends.
Remarks
It is a separate record from ImapAccountSettings rather than a shared one, because a mailbox provider almost never serves both protocols on one endpoint and the two are resolved for different operations. Connection security and permitted authentication mechanisms are deliberately absent here for the same reason they are absent there: they travel with the account's transport security policy, which the caller hands to the session factory. The synthesized ToString() is safe only because MailAccountConnectionMaterial redacts its password.