/// <summary> /// Construct a MailProfile object from a MailAccountInfo object. /// </summary> /// <param name="MailAccountInfo">Description of the mail account settings.</param> public MailProfilePrivate(MailAccountInfo MailAccountInfo) { EmailAddress = MailAccountInfo.EmailAddress; ReplyToAddress = MailAccountInfo.ReplyToAddress; DisplayName = MailAccountInfo.DisplayName; AccountName = MailAccountInfo.AccountName; Inbound = MailAccountInfo.Inbound; Outbound = MailAccountInfo.Outbound; Sign = MailAccountInfo.Sign; foreach (var Key in Sign) { Key.ExportPrivateParameters(); } Encrypt = MailAccountInfo.Encrypt; foreach (var Key in Encrypt) { Key.ExportPrivateParameters(); } }
/// <summary> /// Export the profile parameters to the specified MailAccountInfo /// structure. /// </summary> /// <param name="MailAccountInfo">The object to copy parameters to. /// This object must already exist. Any prepopulated elements that /// are present will be overwritten.</param> /// <example> /// The typical way the Export method is used is to create a MailAccountInfo /// entry for a specific client by creating an object of the class for the /// application in question and passing it to the Export method. /// </example> public void Export (MailAccountInfo MailAccountInfo) { MailAccountInfo.EmailAddress = Private.EmailAddress; MailAccountInfo.ReplyToAddress = Private.ReplyToAddress; MailAccountInfo.DisplayName = Private.DisplayName; MailAccountInfo.AccountName = Private.AccountName; MailAccountInfo.Inbound = Private.Inbound; MailAccountInfo.Outbound = Private.Outbound; MailAccountInfo.Sign = Private.Sign; foreach (var Key in Private.Sign) { Key.ImportPrivateParameters(); } MailAccountInfo.Encrypt = Private.Encrypt; foreach (var Key in Private.Encrypt) { Key.ImportPrivateParameters(); } }