From 55ac6f03a23eca5f5ec9ff57ff4e16e9575770c6 Mon Sep 17 00:00:00 2001 From: ivarlovlie Date: Tue, 29 Nov 2022 13:15:17 +0900 Subject: feat: Use postmarks http api instead of smtp --- code/api/src/Data/Models/AppConfiguration.cs | 39 ++++++++++++++++++---------- 1 file changed, 25 insertions(+), 14 deletions(-) (limited to 'code/api/src/Data') diff --git a/code/api/src/Data/Models/AppConfiguration.cs b/code/api/src/Data/Models/AppConfiguration.cs index e2d7fa6..2a9afc2 100644 --- a/code/api/src/Data/Models/AppConfiguration.cs +++ b/code/api/src/Data/Models/AppConfiguration.cs @@ -54,17 +54,34 @@ public class AppConfiguration /// public string QUARTZ_DB_NAME { get; set; } + /// + /// API key to use when pushing logs to SEQ + /// public string SEQ_API_KEY { get; set; } + + /// + /// Url pointing to the seq instance that processes server logs + /// public string SEQ_API_URL { get; set; } - public string SMTP_HOST { get; set; } - public string SMTP_PORT { get; set; } - public string SMTP_USER { get; set; } - public string SMTP_PASSWORD { get; set; } + + /// + /// A token used when sending email via Postmakr + /// + public string POSTMARK_TOKEN { get; set; } + + /// + /// The address to send emails from, needs to be setup as a sender in postmark + /// public string EMAIL_FROM_ADDRESS { get; set; } - public string EMAIL_FROM_DISPLAY_NAME { get; set; } - public string GITHUB_CLIENT_ID { get; set; } - public string GITHUB_CLIENT_SECRET { get; set; } + + /// + /// The absolute url to the frontend app + /// public string CANONICAL_FRONTEND_URL { get; set; } + + /// + /// A random string used to encrypt/decrypt for general purposes + /// public string APP_AES_KEY { get; set; } /// @@ -86,14 +103,8 @@ public class AppConfiguration QUARTZ_DB_PASSWORD = QUARTZ_DB_PASSWORD.Obfuscate() ?? "", SEQ_API_KEY = SEQ_API_KEY.Obfuscate() ?? "", SEQ_API_URL, - SMTP_HOST, - SMTP_PORT, - SMTP_USER = SMTP_USER.Obfuscate() ?? "", - SMTP_PASSWORD = SMTP_PASSWORD.Obfuscate() ?? "", + POSTMARK_TOKEN = POSTMARK_TOKEN.Obfuscate() ?? "", EMAIL_FROM_ADDRESS, - EMAIL_FROM_DISPLAY_NAME, - GITHUB_CLIENT_ID = GITHUB_CLIENT_ID.Obfuscate() ?? "", - GITHUB_CLIENT_SECRET = GITHUB_CLIENT_SECRET.Obfuscate() ?? "", APP_AES_KEY = APP_AES_KEY.Obfuscate() ?? "", CERT1 = CERT1().PublicKey.Oid.FriendlyName, CANONICAL_FRONTEND_URL -- cgit v1.3