@page
@model GenerateAppSettings
@{
    ViewData["Title"] = "Generate App Settings file";
}
<h1>@ViewData["Title"]</h1>
<div class="alert alert-info" role="alert">
 Replace the appsettings.json with the generated file.
</div>
<div class="alert alert-warning" role="alert">
 Please don't share this file, hince it contains your email password.
</div>
<form method="post">
    <div class="mb-3">
        <label for="exampleFormControlInput1" class="form-label">From address</label>
        <input type="email" class="form-control" asp-for="Config.FromEmail" id="exampleFormControlInput1" placeholder="from@@example.com">
    </div>
    <div class="mb-3">
        <label for="exampleFormControlInput2" class="form-label">To email address</label>
        <input type="email" class="form-control" asp-for="Config.ToEmail" id="exampleFormControlInput2" placeholder="to@@example.com">
    </div>
    <div class="mb-3">
        <label for="exampleFormControlInput3" class="form-label">Username</label>
        <input type="text" class="form-control" asp-for="Config.Username" id="exampleFormControlInput3" placeholder="Username (no @@domain name)">
    </div>
    <div class="mb-3">
        <label for="exampleFormControlInput4" class="form-label">Password</label>
        <input type="password" class="form-control" asp-for="Config.Password" id="exampleFormControlInput4" placeholder="Password">
    </div>
    <div class="mb-3">
        <label for="exampleFormControlInput5" class="form-label">SMTP Server</label>
        <input type="text" class="form-control" asp-for="Config.SmtpServer" id="exampleFormControlInput5" placeholder="smtp.gmail.com">
    </div>
     <div class="mb-3">
        <label for="exampleFormControlInput6" class="form-label">SMTP Port</label>
        <input type="number" min="1" max="65535" value="587" class="form-control" asp-for="Config.SmtpPort" id="exampleFormControlInput6" placeholder="SMTP Port">
    </div>
    <div class="form-check">
        <label for="exampleFormControlInput7" class="form-label">Ignore Certificate errors</label>
        <input type="checkbox" class="form-check-input" asp-for="Config.IgnoreCertError" id="exampleFormControlInput7">
    </div>
    <div class="mb-3">
        <label for="exampleFormControlInput8" class="form-label">Secure Socket Option</label>
        <select class="form-select" asp-for="Config.SecureOption" id="exampleFormControlInput8" aria-label="Default select example">
            <option value="0">None</option>
            <option value="1">Auto</option>
            <option value="2">Ssl On Connect</option>
            <option value="3" selected>StartTls</option>
            <option value="4">StartTls When Available</option>
        </select>
    </div>
    <input type="submit" class="btn btn-primary" value="Download appsettings.json">
   
</form>
