Email is now Built-in! (#2635)
This commit is contained in:
parent
2a539da24c
commit
a85644fb6b
55 changed files with 5129 additions and 1047 deletions
|
@ -47,9 +47,6 @@ public class ServerSettingConverter : ITypeConverter<IEnumerable<ServerSetting>,
|
|||
case ServerSettingKey.BookmarkDirectory:
|
||||
destination.BookmarksDirectory = row.Value;
|
||||
break;
|
||||
case ServerSettingKey.EmailServiceUrl:
|
||||
destination.EmailServiceUrl = row.Value;
|
||||
break;
|
||||
case ServerSettingKey.InstallVersion:
|
||||
destination.InstallVersion = row.Value;
|
||||
break;
|
||||
|
@ -83,6 +80,45 @@ public class ServerSettingConverter : ITypeConverter<IEnumerable<ServerSetting>,
|
|||
case ServerSettingKey.CoverImageSize:
|
||||
destination.CoverImageSize = Enum.Parse<CoverImageSize>(row.Value);
|
||||
break;
|
||||
case ServerSettingKey.BackupDirectory:
|
||||
destination.BookmarksDirectory = row.Value;
|
||||
break;
|
||||
case ServerSettingKey.EmailHost:
|
||||
destination.SmtpConfig ??= new SmtpConfigDto();
|
||||
destination.SmtpConfig.Host = row.Value;
|
||||
break;
|
||||
case ServerSettingKey.EmailPort:
|
||||
destination.SmtpConfig ??= new SmtpConfigDto();
|
||||
destination.SmtpConfig.Port = string.IsNullOrEmpty(row.Value) ? 0 : int.Parse(row.Value);
|
||||
break;
|
||||
case ServerSettingKey.EmailAuthPassword:
|
||||
destination.SmtpConfig ??= new SmtpConfigDto();
|
||||
destination.SmtpConfig.Password = row.Value;
|
||||
break;
|
||||
case ServerSettingKey.EmailAuthUserName:
|
||||
destination.SmtpConfig ??= new SmtpConfigDto();
|
||||
destination.SmtpConfig.UserName = row.Value;
|
||||
break;
|
||||
case ServerSettingKey.EmailSenderAddress:
|
||||
destination.SmtpConfig ??= new SmtpConfigDto();
|
||||
destination.SmtpConfig.SenderAddress = row.Value;
|
||||
break;
|
||||
case ServerSettingKey.EmailSenderDisplayName:
|
||||
destination.SmtpConfig ??= new SmtpConfigDto();
|
||||
destination.SmtpConfig.SenderDisplayName = row.Value;
|
||||
break;
|
||||
case ServerSettingKey.EmailEnableSsl:
|
||||
destination.SmtpConfig ??= new SmtpConfigDto();
|
||||
destination.SmtpConfig.EnableSsl = bool.Parse(row.Value);
|
||||
break;
|
||||
case ServerSettingKey.EmailSizeLimit:
|
||||
destination.SmtpConfig ??= new SmtpConfigDto();
|
||||
destination.SmtpConfig.SizeLimit = int.Parse(row.Value);
|
||||
break;
|
||||
case ServerSettingKey.EmailCustomizedTemplates:
|
||||
destination.SmtpConfig ??= new SmtpConfigDto();
|
||||
destination.SmtpConfig.CustomizedTemplates = bool.Parse(row.Value);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue