Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @model PartyInvites.Models.GuestResponse
- @{
- Layout = null;
- }
- <!DOCTYPE html>
- <html>
- <head>
- <meta name="viewport" content="width=device-width" />
- <title>Thanks</title>
- <link href="~/Content/bootstrap.css" rel="stylesheet" />
- <link href="~/Content/bootstrap-theme.css" rel="stylesheet" />
- <style>
- body { background: #f1f1f1; }
- </style>
- </head>
- <body>
- @{
- try
- {
- WebMail.SmtpServer = "smtp.example.com";
- WebMail.SmtpPort = 587;
- WebMail.EnableSsl = true;
- WebMail.UserName = "mySmtpUsername";
- WebMail.Password = "mySmtpPassword";
- WebMail.From = "myemai@example.com";
- WebMail.Send("myemail@example.com", "RSVP Приглашение",
- Model.Name + ((Model.WillAttend ?? false) ? " " : "не") + "придет");
- }
- catch (Exception)
- {
- @:<b>К сожалению при отправке письма возникла ошибка.</b>
- }
- }
- <div class="text-center">
- <h1>Спасибо, @Model.Name!</h1>
- <div class="lead">
- @if (Model.WillAttend == true)
- {
- @:Здорово что вы придете, напитки уже в холодильнике ;)
- }
- else
- {
- @:Жаль что вы не придете, но спасибо что дали об этом знать.
- }
- </div>
- </div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement