2018-12-08 19:27:21 +01:00
|
|
|
@model MailSender.Models.MailModel
|
|
|
|
@{
|
|
|
|
ViewBag.Title = "Mail Sender";
|
|
|
|
}
|
|
|
|
<h2>Send Mail</h2>
|
|
|
|
|
2018-12-09 02:20:46 +01:00
|
|
|
@if (ViewData.ContainsKey("mailErr"))
|
|
|
|
{
|
|
|
|
<h3>Error: @ViewData["mailErr"]</h3>
|
|
|
|
}
|
2018-12-08 19:27:21 +01:00
|
|
|
|
|
|
|
@using (Html.BeginForm("Index", "Home", FormMethod.Post))
|
|
|
|
{
|
|
|
|
<div class="form-group">
|
|
|
|
@Html.LabelFor(i => i.Subject, new { @class = "label-form" })
|
|
|
|
@Html.EditorFor(i => i.Subject, new { htmlAttributes = new { @class = "form-control", @placeholder = "Subject" } })
|
2018-12-09 02:20:46 +01:00
|
|
|
@Html.ValidationMessageFor(i => i.Subject)
|
2018-12-08 19:27:21 +01:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="form-group">
|
|
|
|
@Html.LabelFor(i => i.EMailTo, new { @class = "label-form" })
|
|
|
|
@Html.EditorFor(i => i.EMailTo, new { htmlAttributes = new { @class = "form-control", @placeholder = "To" } })
|
2018-12-09 02:20:46 +01:00
|
|
|
@Html.ValidationMessageFor(i => i.EMailTo)
|
2018-12-08 19:27:21 +01:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="form-group">
|
|
|
|
@Html.LabelFor(i => i.Content, new { @class = "label-form" })
|
|
|
|
@Html.EditorFor(i => i.Content, new { htmlAttributes = new { @class = "form-control", @placeholder = "Body" } })
|
2018-12-09 02:20:46 +01:00
|
|
|
@Html.ValidationMessageFor(i => i.Content)
|
2018-12-08 19:27:21 +01:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<input type="submit" value="Send" />
|
2018-12-09 02:20:46 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
@section Scripts {
|
|
|
|
@Scripts.Render("~/bundles/jqueryval")
|
2018-12-08 19:27:21 +01:00
|
|
|
}
|