OnPost(string deviceId)
{
if (!ModelState.IsValid)
{
return Page();
}
- var orgID = _dataService.GetDevice(deviceID)?.OrganizationID;
+ var orgID = _dataService.GetDevice(deviceId)?.OrganizationID;
var alertParts = new string[]
{
$"{Input.Name} is requesting support.",
+ $"Device ID: {deviceId}",
$"Email: {Input.Email}.",
$"Phone: {Input.Phone}.",
$"Chat OK: {Input.ChatResponseOk}."
};
var alertMessage = string.Join(" ", alertParts);
- await _dataService.AddAlert(deviceID, orgID, alertMessage);
+ await _dataService.AddAlert(deviceId, orgID, alertMessage);
var orgUsers = await _dataService.GetAllUsersInOrganization(orgID);
var emailMessage = string.Join("
", alertParts);
@@ -57,7 +58,7 @@ namespace Remotely.Server.Pages
StatusMessage = "We got it! Someone will contact you soon.";
- return RedirectToPage("GetSupport", new { deviceID });
+ return RedirectToPage("GetSupport", new { deviceId });
}
public class InputModel
diff --git a/Server/Pages/ServerConfig.razor b/Server/Pages/ServerConfig.razor
index 71b72c93..b0dd73a8 100644
--- a/Server/Pages/ServerConfig.razor
+++ b/Server/Pages/ServerConfig.razor
@@ -250,6 +250,16 @@
+
diff --git a/Server/Pages/ServerConfig.razor.cs b/Server/Pages/ServerConfig.razor.cs
index 974c2678..c4c5b98d 100644
--- a/Server/Pages/ServerConfig.razor.cs
+++ b/Server/Pages/ServerConfig.razor.cs
@@ -84,6 +84,9 @@ namespace Remotely.Server.Pages
[Display(Name = "SMTP Local Domain")]
public string SmtpLocalDomain { get; set; }
+ [Display(Name = "SMTP Check Certificate Revocation")]
+ public bool SmtpCheckCertificateRevocation { get; set; }
+
[Display(Name = "SMTP Password")]
public string SmtpPassword { get; set; }
@@ -320,7 +323,7 @@ namespace Remotely.Server.Pages
}
else
{
- ToastService.ShowToast("Error sending email. Check the server logs for details.");
+ ToastService.ShowToast("Error sending email. Check the server logs for details.", classString: "bg-error");
_alertMessage = "Error sending email. Check the server logs for details.";
}
}
diff --git a/Server/Services/ApplicationConfig.cs b/Server/Services/ApplicationConfig.cs
index cb072afe..a00a28c2 100644
--- a/Server/Services/ApplicationConfig.cs
+++ b/Server/Services/ApplicationConfig.cs
@@ -30,6 +30,7 @@ namespace Remotely.Server.Services
string SmtpPassword { get; }
int SmtpPort { get; }
string SmtpUserName { get; }
+ bool SmtpCheckCertificateRevocation { get; }
Theme Theme { get; }
string[] TrustedCorsOrigins { get; }
bool UseHsts { get; }
@@ -72,6 +73,7 @@ namespace Remotely.Server.Services
public string SmtpPassword => Config["ApplicationOptions:SmtpPassword"];
public int SmtpPort => int.Parse(Config["ApplicationOptions:SmtpPort"] ?? "25");
public string SmtpUserName => Config["ApplicationOptions:SmtpUserName"];
+ public bool SmtpCheckCertificateRevocation => bool.Parse(Config["ApplicationOptions:SmtpCheckCertificateRevocation"] ?? "true");
public Theme Theme => Enum.Parse(Config["ApplicationOptions:Theme"] ?? "Dark", true);
public string[] TrustedCorsOrigins => Config.GetSection("ApplicationOptions:TrustedCorsOrigins").Get() ?? System.Array.Empty();
public bool UseHsts => bool.Parse(Config["ApplicationOptions:UseHsts"] ?? "false");
diff --git a/Server/Services/EmailSender.cs b/Server/Services/EmailSender.cs
index 0e2f4971..e92816f9 100644
--- a/Server/Services/EmailSender.cs
+++ b/Server/Services/EmailSender.cs
@@ -46,6 +46,9 @@ namespace Remotely.Server.Services
{
client.LocalDomain = AppConfig.SmtpLocalDomain;
}
+
+ client.CheckCertificateRevocation = AppConfig.SmtpCheckCertificateRevocation;
+
await client.ConnectAsync(AppConfig.SmtpHost, AppConfig.SmtpPort);
await client.AuthenticateAsync(AppConfig.SmtpUserName, AppConfig.SmtpPassword);
diff --git a/Server/appsettings.json b/Server/appsettings.json
index 3a647bc1..3d679156 100644
--- a/Server/appsettings.json
+++ b/Server/appsettings.json
@@ -45,6 +45,7 @@
"SmtpPassword": "",
"SmtpPort": 587,
"SmtpUserName": "",
+ "SmtpCheckCertificateRevocation": true,
"Theme": "Dark",
"TrustedCorsOrigins": [],
"UseHsts": false,