add ProxyJump function

This commit is contained in:
redlineo committed 2026-07-23 12:38:13 +03:00
1 parent 56e20e5464
commit 7f0e0fdb23
48 files changed
+3875 -44

No files matched your search

@@ -0,0 +1,37 @@
namespace BulkArchiveMailer.Core
{
/// <summary>One editable Subject + BodyHtml pair.</summary>
public sealed class MailTemplate
{
public string Subject { get; set; } = "";
public string BodyHtml { get; set; } = "";
}
/// <summary>The two named template keys used throughout the tool (matches ArchiveKind, and the JSON config's "templates" object).</summary>
public static class MailTemplateKeys
{
public const string SshAccess = "ssh_access";
public const string ConfigUpdate = "config_update";
public static string For(ArchiveKind kind) => kind == ArchiveKind.SshAccess ? SshAccess : ConfigUpdate;
}
/// <summary>Both named templates together, as used by ArchiveScanner to render a SendJob's Subject/BodyHtml.</summary>
public sealed class MailTemplateSet
{
public MailTemplate SshAccess { get; set; } = new MailTemplate();
public MailTemplate ConfigUpdate { get; set; } = new MailTemplate();
public MailTemplate Get(ArchiveKind kind) => kind == ArchiveKind.SshAccess ? SshAccess : ConfigUpdate;
/// <summary>
/// The two templates as shipped in config.default.json (embedded
/// resource), independent of anything the user has saved to
/// %APPDATA%\BulkArchiveMailer\config.json. Mainly useful for a
/// "reset to defaults" action in SettingsForm.
/// </summary>
public static MailTemplateSet LoadDefaults() => AppSettings.LoadDefaults().ToTemplateSet();
}
}