Advertisement
Guest User

Untitled

a guest
Sep 4th, 2017
514
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 1.55 KB | None | 0 0
  1. @model PartyInvites.Models.GuestResponse
  2.  
  3. @{
  4.     Layout = null;
  5. }
  6.  
  7. <!DOCTYPE html>
  8. <html>
  9. <head>
  10.     <meta name="viewport" content="width=device-width" />
  11.     <title>Thanks</title>
  12.     <link href="~/Content/bootstrap.css" rel="stylesheet" />
  13.     <link href="~/Content/bootstrap-theme.css" rel="stylesheet" />
  14.     <style>
  15.         body { background: #f1f1f1; }
  16.     </style>
  17. </head>
  18. <body>
  19.     @{
  20.         try
  21.         {
  22.             WebMail.SmtpServer = "smtp.example.com";
  23.             WebMail.SmtpPort = 587;
  24.             WebMail.EnableSsl = true;
  25.             WebMail.UserName = "mySmtpUsername";
  26.             WebMail.Password = "mySmtpPassword";
  27.             WebMail.From = "myemai@example.com";
  28.  
  29.             WebMail.Send("myemail@example.com", "RSVP Приглашение",
  30.                 Model.Name + ((Model.WillAttend ?? false) ? " " : "не") + "придет");
  31.  
  32.         }
  33.         catch (Exception)
  34.         {
  35.             @:<b>К сожалению при отправке письма возникла ошибка.</b>
  36.         }
  37.     }
  38.     <div class="text-center">
  39.         <h1>Спасибо, @Model.Name!</h1>
  40.         <div class="lead">
  41.             @if (Model.WillAttend == true)
  42.             {
  43.                 @:Здорово что вы придете, напитки уже в холодильнике ;)
  44.             }
  45.             else
  46.             {
  47.                 @:Жаль что вы не придете, но спасибо что дали об этом знать.
  48.             }
  49.         </div>
  50.     </div>
  51. </body>
  52. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement