mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2024-11-19 01:43:50 +01:00
Fix email settings on store level, when server has no email settings (#6080)
* Fix email settings on store level, when server has no email settings Fixes #6076. * docker-compose: Add missing restart for merchant CLN container
This commit is contained in:
parent
f03ea5c115
commit
a46073f3e4
@ -2919,7 +2919,7 @@ namespace BTCPayServer.Tests
|
||||
Password = "store@store.com",
|
||||
Port = 1234,
|
||||
Server = "store.com"
|
||||
}), "", true));
|
||||
}), ""));
|
||||
|
||||
Assert.Equal("store@store.com", (await Assert.IsType<StoreEmailSender>(await emailSenderFactory.GetEmailSender(acc.StoreId)).GetEmailSettings()).Login);
|
||||
}
|
||||
|
@ -195,10 +195,11 @@ public partial class UIStoresController
|
||||
if (store == null)
|
||||
return NotFound();
|
||||
|
||||
ViewBag.UseCustomSMTP = useCustomSMTP;
|
||||
model.FallbackSettings = await _emailSenderFactory.GetEmailSender(store.Id) is StoreEmailSender { FallbackSender: not null } storeSender
|
||||
? await storeSender.FallbackSender.GetEmailSettings()
|
||||
: null;
|
||||
if (model.FallbackSettings is null) useCustomSMTP = true;
|
||||
ViewBag.UseCustomSMTP = useCustomSMTP;
|
||||
if (useCustomSMTP)
|
||||
{
|
||||
model.Settings.Validate("Settings.", ModelState);
|
||||
|
@ -29,6 +29,7 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
<input type="hidden" name="UseCustomSMTP" value="true" />
|
||||
<partial name="EmailsBody" model="Model" />
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user