2019-05-01 05:17:25 +02:00
|
|
|
@model BTCPayServer.Models.ServerViewModels.EmailsViewModel
|
|
|
|
|
|
|
|
|
2019-10-31 04:29:59 +01:00
|
|
|
<partial name="_StatusMessage" />
|
2019-05-01 05:17:25 +02:00
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-md-6">
|
|
|
|
<div asp-validation-summary="All" class="text-danger"></div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2019-08-07 21:31:08 +02:00
|
|
|
|
2019-08-07 22:10:15 +02:00
|
|
|
<div class="row row-quick-fill" style="display: none">
|
2019-08-07 21:31:08 +02:00
|
|
|
<div class="col-sm-6">
|
|
|
|
<div class="dropdown quick-fill">
|
|
|
|
<button class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
|
|
|
Quick fill settings for...
|
|
|
|
</button>
|
|
|
|
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
|
|
|
|
<a class="dropdown-item" href="" data-Server="smtp.gmail.com" data-Port="587" data-EnableSSL="true">Gmail.com</a>
|
|
|
|
<a class="dropdown-item" href="" data-Server="mail.yahoo.com" data-Port="587" data-EnableSSL="true">Yahoo.com</a>
|
2020-02-15 06:37:29 +01:00
|
|
|
<a class="dropdown-item" href="" data-Server="smtp.mailgun.org" data-Port="587" data-EnableSSL="true">Mailgun</a>
|
2019-11-17 23:12:06 +01:00
|
|
|
<a class="dropdown-item" href="" data-Server="smtp.office365.com" data-Port="587" data-EnableSSL="true">Office365</a>
|
2020-02-15 06:37:29 +01:00
|
|
|
<a class="dropdown-item" href="" data-Server="smtp.sendgrid.net" data-Port="587" data-EnableSSL="true">SendGrid</a>
|
2019-08-07 21:31:08 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<p></p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<script>
|
|
|
|
$(document).ready(function(){
|
2019-08-07 22:10:15 +02:00
|
|
|
$('.row-quick-fill').show();
|
|
|
|
|
2019-08-07 21:31:08 +02:00
|
|
|
$('.dropdown.quick-fill a').click(function(e){
|
|
|
|
e.preventDefault();
|
|
|
|
|
|
|
|
var aNode = $(this);
|
|
|
|
var data = aNode.data();
|
|
|
|
|
|
|
|
for(var key in data){
|
|
|
|
var value = data[key];
|
|
|
|
var inputNodes = $('input[name*="Settings.'+key+'" i]');
|
|
|
|
|
|
|
|
if(inputNodes.length){
|
|
|
|
inputNodes.each(function(i, input){
|
|
|
|
input = $(input);
|
|
|
|
var type = input.attr('type');
|
|
|
|
if(type === 'checkbox'){
|
|
|
|
input.prop('checked', value);
|
|
|
|
|
|
|
|
}else{
|
|
|
|
input.val(value);
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|
2020-07-09 17:22:22 +02:00
|
|
|
<form method="post" autocomplete="off">
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-md-6">
|
2019-05-01 05:17:25 +02:00
|
|
|
<div class="form-group">
|
|
|
|
<label asp-for="Settings.Server"></label>
|
2019-08-07 21:31:08 +02:00
|
|
|
<input asp-for="Settings.Server" class="form-control"/>
|
2019-05-01 05:17:25 +02:00
|
|
|
<span asp-validation-for="Settings.Server" class="text-danger"></span>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label asp-for="Settings.Port"></label>
|
2019-08-07 21:31:08 +02:00
|
|
|
<input asp-for="Settings.Port" class="form-control"/>
|
2019-05-01 05:17:25 +02:00
|
|
|
<span asp-validation-for="Settings.Port" class="text-danger"></span>
|
|
|
|
</div>
|
2019-07-14 15:45:14 +02:00
|
|
|
<div class="form-group">
|
|
|
|
<label asp-for="Settings.FromDisplay"></label>
|
2019-08-07 21:31:08 +02:00
|
|
|
<input asp-for="Settings.FromDisplay" class="form-control"/>
|
|
|
|
<small class="form-text text-muted">
|
|
|
|
Some email providers (like Gmail) don't allow you to set your display name, so this setting may not have any effect.
|
|
|
|
</small>
|
2019-07-14 15:45:14 +02:00
|
|
|
<span asp-validation-for="Settings.FromDisplay" class="text-danger"></span>
|
|
|
|
</div>
|
2019-05-01 05:17:25 +02:00
|
|
|
<div class="form-group">
|
|
|
|
<label asp-for="Settings.From"></label>
|
2019-08-07 21:31:08 +02:00
|
|
|
<input asp-for="Settings.From" class="form-control"/>
|
2019-05-01 05:17:25 +02:00
|
|
|
<span asp-validation-for="Settings.From" class="text-danger"></span>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label asp-for="Settings.Login"></label>
|
2019-08-07 21:31:08 +02:00
|
|
|
<input asp-for="Settings.Login" class="form-control"/>
|
|
|
|
<small class="form-text text-muted">
|
|
|
|
For many email providers (like Gmail) your login is your email address.
|
|
|
|
</small>
|
2019-05-01 05:17:25 +02:00
|
|
|
<span asp-validation-for="Settings.Login" class="text-danger"></span>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label asp-for="Settings.Password"></label>
|
2019-08-07 21:31:08 +02:00
|
|
|
<input asp-for="Settings.Password" value="@Model.Settings.Password" class="form-control"/>
|
2019-05-01 05:17:25 +02:00
|
|
|
<span asp-validation-for="Settings.Password" class="text-danger"></span>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
2019-10-14 05:07:41 +02:00
|
|
|
<div class="form-check">
|
|
|
|
<input asp-for="Settings.EnableSSL" type="checkbox" class="form-check-input"/>
|
|
|
|
<label asp-for="Settings.EnableSSL" class="form-check-label"></label>
|
|
|
|
</div>
|
2019-05-01 05:17:25 +02:00
|
|
|
</div>
|
2020-07-09 17:22:22 +02:00
|
|
|
<button type="submit" class="btn btn-primary" name="command" value="Save">Save</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<hr class="mt-5 mb-4" />
|
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-md-6">
|
2019-05-01 05:17:25 +02:00
|
|
|
<div class="form-group">
|
2020-07-09 17:22:22 +02:00
|
|
|
<p class="form-text text-muted">
|
|
|
|
If you want to test your settings, enter an email address here and click "Send Test Email".
|
|
|
|
<strong>Your settings won't be saved</strong>, only a test email will be sent.
|
|
|
|
<br/>
|
|
|
|
After a successful test, you can click "Save".
|
|
|
|
</p>
|
2019-05-01 05:17:25 +02:00
|
|
|
<label asp-for="TestEmail"></label>
|
2019-08-07 21:31:08 +02:00
|
|
|
<input asp-for="TestEmail" class="form-control"/>
|
2019-05-01 05:17:25 +02:00
|
|
|
<span asp-validation-for="TestEmail" class="text-danger"></span>
|
|
|
|
</div>
|
2020-07-09 17:22:22 +02:00
|
|
|
<button type="submit" class="btn btn-secondary" name="command" value="Test">Send Test Email</button>
|
|
|
|
</div>
|
2019-05-01 05:17:25 +02:00
|
|
|
</div>
|
2020-07-09 17:22:22 +02:00
|
|
|
</form>
|
2019-05-01 05:17:25 +02:00
|
|
|
|
|
|
|
@section Scripts {
|
|
|
|
@await Html.PartialAsync("_ValidationScriptsPartial")
|
|
|
|
}
|