DO $$
 
BEGIN
INSERT INTO public."MessageSettings"("Key",  "Value", "Lang") VALUES ('NewEmail|Subject' ,N'Подтверждение почты','')
ON CONFLICT ("Key","Lang") DO UPDATE SET "Value"= EXCLUDED."Value";

INSERT INTO public."MessageSettings"("Key",  "Value", "Lang") VALUES ('NewEmail|BodyHtml' ,N'Что бы подтвердить почту, перейдите по <a href="{0}">ссылке</a>','')
ON CONFLICT ("Key","Lang") DO UPDATE SET "Value"= EXCLUDED."Value";

INSERT INTO public."MessageSettings"("Key",  "Value", "Lang") VALUES ('NewEmail|BodyText' ,N'Что бы подтвердить почту, перейдите по <a href="{0}">ссылке</a>','')
ON CONFLICT ("Key","Lang") DO UPDATE SET "Value"= EXCLUDED."Value";

INSERT INTO public."MessageSettings"("Key",  "Value", "Lang") VALUES('ResetPasswordByUserEmail|Subject' ,N'Смена пароля','')
ON CONFLICT ("Key","Lang") DO UPDATE SET "Value"= EXCLUDED."Value";

INSERT INTO public."MessageSettings"("Key",  "Value", "Lang") VALUES('ResetPasswordByUserEmail|BodyHtml' ,N'Для восстановления пароля перейдите по <a href="{0}">ссылке</a> и в открывшемся окне введите новый пароль. Ссылка действует 24 часа.','')
ON CONFLICT ("Key","Lang") DO UPDATE SET "Value"= EXCLUDED."Value";

INSERT INTO public."MessageSettings"("Key",  "Value", "Lang") VALUES('ResetPasswordByUserEmail|BodyText' ,N'Для восстановления пароля перейдите по <a href="{0}">ссылке</a> и в открывшемся окне введите новый пароль. Ссылка действует 24 часа.','')
ON CONFLICT ("Key","Lang") DO UPDATE SET "Value"= EXCLUDED."Value";

INSERT INTO public."MessageSettings"("Key",  "Value", "Lang") VALUES('Email.OneHour|Subject' ,N'Уведомление: {0} — {1}','')
ON CONFLICT ("Key","Lang") DO UPDATE SET "Value"= EXCLUDED."Value";

INSERT INTO public."MessageSettings"("Key",  "Value", "Lang") VALUES('Email.OneHour|BodyHtml' ,N'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:o="urn:schemas-microsoft-com:office:office">
 <head>
  <meta charset="UTF-8">
  <meta content="width=device-width, initial-scale=1" name="viewport">
  <meta name="x-apple-disable-message-reformatting">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta content="telephone=no" name="format-detection">
  <title>Уведомление о приближающемся событии</title><!--[if (mso 16)]>
    <style type="text/css">
    a {text-decoration: none;}
    </style>
    <![endif]--><!--[if gte mso 9]><style>sup { font-size: 100% !important; }</style><![endif]--><!--[if gte mso 9]>
<xml>
    <o:OfficeDocumentSettings>
    <o:AllowPNG></o:AllowPNG>
    <o:PixelsPerInch>96</o:PixelsPerInch>
    </o:OfficeDocumentSettings>
</xml>
<![endif]-->
  <style type="text/css">
.rollover:hover .rollover-first {
  max-height:0px!important;
  display:none!important;
  }
  .rollover:hover .rollover-second {
  max-height:none!important;
  display:inline-block!important;
  }
  .rollover div {
  font-size:0px;
  }
  u ~ div img + div > div {
  display:none;
  }
  #outlook a {
  padding:0;
  }
  span.MsoHyperlink,
span.MsoHyperlinkFollowed {
  color:inherit;
  mso-style-priority:99;
  }
  a.es-button {
  mso-style-priority:100!important;
  text-decoration:none!important;
  }
  a[x-apple-data-detectors] {
  color:inherit!important;
  text-decoration:none!important;
  font-size:inherit!important;
  font-family:inherit!important;
  font-weight:inherit!important;
  line-height:inherit!important;
  }
  .es-desk-hidden {
  display:none;
  float:left;
  overflow:hidden;
  width:0;
  max-height:0;
  line-height:0;
  mso-hide:all;
  }
  .es-button-border:hover > a.es-button {
  color:#ffffff!important;
  }
@media only screen and (max-width:600px) {*[class="gmail-fix"] { display:none!important } p, a { line-height:150%!important } h1, h1 a { line-height:120%!important } h2, h2 a { line-height:120%!important } h3, h3 a { line-height:120%!important } h4, h4 a { line-height:120%!important } h5, h5 a { line-height:120%!important } h6, h6 a { line-height:120%!important } h1 { font-size:36px!important; text-align:left } h2 { font-size:26px!important; text-align:left } h3 { font-size:20px!important; text-align:left } h4 { font-size:24px!important; text-align:left } h5 { font-size:20px!important; text-align:left } h6 { font-size:16px!important; text-align:left } .es-header-body h1 a, .es-content-body h1 a, .es-footer-body h1 a { font-size:36px!important } .es-header-body h2 a, .es-content-body h2 a, .es-footer-body h2 a { font-size:26px!important } .es-header-body h3 a, .es-content-body h3 a, .es-footer-body h3 a { font-size:20px!important } .es-header-body h4 a, .es-content-body h4 a, .es-footer-body h4 a { font-size:24px!important } .es-header-body h5 a, .es-content-body h5 a, .es-footer-body h5 a { font-size:20px!important } .es-header-body h6 a, .es-content-body h6 a, .es-footer-body h6 a { font-size:16px!important } .es-menu td a { font-size:12px!important } .es-header-body p, .es-header-body a { font-size:14px!important } .es-content-body p, .es-content-body a { font-size:16px!important } .es-footer-body p, .es-footer-body a { font-size:14px!important } .es-infoblock p, .es-infoblock a { font-size:12px!important } .es-m-txt-c, .es-m-txt-c h1, .es-m-txt-c h2, .es-m-txt-c h3, .es-m-txt-c h4, .es-m-txt-c h5, .es-m-txt-c h6 { text-align:center!important } .es-m-txt-r, .es-m-txt-r h1, .es-m-txt-r h2, .es-m-txt-r h3, .es-m-txt-r h4, .es-m-txt-r h5, .es-m-txt-r h6 { text-align:right!important } .es-m-txt-j, .es-m-txt-j h1, .es-m-txt-j h2, .es-m-txt-j h3, .es-m-txt-j h4, .es-m-txt-j h5, .es-m-txt-j h6 { text-align:justify!important } .es-m-txt-l, .es-m-txt-l h1, .es-m-txt-l h2, .es-m-txt-l h3, .es-m-txt-l h4, .es-m-txt-l h5, .es-m-txt-l h6 { text-align:left!important } .es-m-txt-r img, .es-m-txt-c img, .es-m-txt-l img { display:inline!important } .es-m-txt-r .rollover:hover .rollover-second, .es-m-txt-c .rollover:hover .rollover-second, .es-m-txt-l .rollover:hover .rollover-second { display:inline!important } .es-m-txt-r .rollover div, .es-m-txt-c .rollover div, .es-m-txt-l .rollover div { line-height:0!important; font-size:0!important } .es-spacer { display:inline-table } a.es-button, button.es-button { font-size:20px!important } a.es-button, button.es-button { display:inline-block!important } .es-button-border { display:inline-block!important } .es-m-fw, .es-m-fw.es-fw, .es-m-fw .es-button { display:block!important } .es-m-il, .es-m-il .es-button, .es-social, .es-social td, .es-menu { display:inline-block!important } .es-adaptive table, .es-left, .es-right { width:100%!important } .es-content table, .es-header table, .es-footer table, .es-content, .es-footer, .es-header { width:100%!important; max-width:600px!important } .adapt-img { width:100%!important; height:auto!important } .es-mobile-hidden, .es-hidden { display:none!important } .es-desk-hidden { width:auto!important; overflow:visible!important; float:none!important; max-height:inherit!important; line-height:inherit!important } tr.es-desk-hidden { display:table-row!important } table.es-desk-hidden { display:table!important } td.es-desk-menu-hidden { display:table-cell!important } .es-menu td { width:1%!important } table.es-table-not-adapt, .esd-block-html table { width:auto!important } .es-social td { padding-bottom:10px } .h-auto { height:auto!important } a.es-button.es-button-6874 { font-size:14px!important } .img-3148 { height:36px!important } .es-text-2975, .es-text-2975 p, .es-text-2975 a, .es-text-2975 h1, .es-text-2975 h2, .es-text-2975 h3, .es-text-2975 h4, .es-text-2975 h5, .es-text-2975 h6, .es-text-2975 ul, .es-text-2975 ol { font-size:14px!important } .es-text-4842, .es-text-4842 p, .es-text-4842 a, .es-text-4842 h1, .es-text-4842 h2, .es-text-4842 h3, .es-text-4842 h4, .es-text-4842 h5, .es-text-4842 h6, .es-text-4842 ul, .es-text-4842 ol { font-size:14px!important } .es-text-3519, .es-text-3519 p, .es-text-3519 a, .es-text-3519 h1, .es-text-3519 h2, .es-text-3519 h3, .es-text-3519 h4, .es-text-3519 h5, .es-text-3519 h6, .es-text-3519 ul, .es-text-3519 ol { font-size:14px!important } .es-text-5889, .es-text-5889 p, .es-text-5889 a, .es-text-5889 h1, .es-text-5889 h2, .es-text-5889 h3, .es-text-5889 h4, .es-text-5889 h5, .es-text-5889 h6, .es-text-5889 ul, .es-text-5889 ol { font-size:14px!important } .es-text-8833, .es-text-8833 p, .es-text-8833 a, .es-text-8833 h1, .es-text-8833 h2, .es-text-8833 h3, .es-text-8833 h4, .es-text-8833 h5, .es-text-8833 h6, .es-text-8833 ul, .es-text-8833 ol { font-size:14px!important } }
</style>
 </head>
 <body style="width:100%;height:100%;padding:0;Margin:0">
  <div class="es-wrapper-color" style="background-color:#FAFAFA"><!--[if gte mso 9]>
			<v:background xmlns:v="urn:schemas-microsoft-com:vml" fill="t">
				<v:fill type="tile" color="#fafafa"></v:fill>
			</v:background>
		<![endif]-->
   <table class="es-wrapper" width="100%" cellspacing="0" cellpadding="0" style="mso-table-lspace:0pt;mso-table-rspace:0pt;border-collapse:collapse;border-spacing:0px;padding:0;Margin:0;width:100%;height:100%;background-repeat:repeat;background-position:center top;background-color:#f5f5f5">
     <tr>
      <td valign="top" style="padding:0;Margin:0">
       <table cellpadding="0" cellspacing="0" class="es-header" align="center" style="mso-table-lspace:0pt;mso-table-rspace:0pt;border-collapse:collapse;border-spacing:0px;width:100%;table-layout:fixed !important;background-color:transparent;background-repeat:repeat;background-position:center top">
         <tr>
          <td align="center" style="padding:0;Margin:0">
           <table bgcolor="#ffffff" class="es-header-body" align="center" cellpadding="0" cellspacing="0" style="mso-table-lspace:0pt;mso-table-rspace:0pt;border-collapse:collapse;border-spacing:0px;background-color:transparent;width:600px">
             <tr>
              <td align="left" style="Margin:0;padding-top:10px;padding-right:20px;padding-bottom:10px;padding-left:20px">
               <table cellpadding="0" cellspacing="0" width="100%" style="mso-table-lspace:0pt;mso-table-rspace:0pt;border-collapse:collapse;border-spacing:0px">
                 <tr>
                  <td class="es-m-p0r" valign="top" align="center" style="padding:0;Margin:0;width:560px">
                   <table cellpadding="0" cellspacing="0" width="100%" style="mso-table-lspace:0pt;mso-table-rspace:0pt;border-collapse:collapse;border-spacing:0px">
                     <tr>
                      <td align="left" style="padding:10px;Margin:0;font-size:0"><img class="img-3148" src="@eventimage" alt="" height="36" style="display:block;font-size:14px;border:0;outline:none;text-decoration:none"></td>
                     </tr>
                   </table></td>
                 </tr>
               </table></td>
             </tr>
           </table></td>
         </tr>
       </table>
       <table cellpadding="0" cellspacing="0" class="es-content" align="center" style="mso-table-lspace:0pt;mso-table-rspace:0pt;border-collapse:collapse;border-spacing:0px;width:100%;table-layout:fixed !important">
         <tr>
          <td align="center" style="padding:0;Margin:0">
           <table bgcolor="transparent" class="es-content-body" align="center" cellpadding="0" cellspacing="0" style="mso-table-lspace:0pt;mso-table-rspace:0pt;border-collapse:separate;border-spacing:0px;background-color:transparent;width:600px;border-width:0">
             <tr>
              <td align="left" style="Margin:0;padding-right:20px;padding-left:20px;padding-top:30px;padding-bottom:30px;border-radius:32px;background-color:#ffffff" bgcolor="#ffffff">
               <table cellpadding="0" cellspacing="0" width="100%" style="mso-table-lspace:0pt;mso-table-rspace:0pt;border-collapse:collapse;border-spacing:0px">
                 <tr>
                  <td align="center" valign="top" style="padding:0;Margin:0;width:560px">
                   <table cellpadding="0" cellspacing="0" width="100%" style="mso-table-lspace:0pt;mso-table-rspace:0pt;border-collapse:collapse;border-spacing:0px">
                     <tr>
                      <td align="left" class="es-text-2975 es-m-p10l es-m-p10r" style="padding:0;Margin:0;padding-right:20px;padding-left:20px;font-size:28px !important"><p style="Margin:0;mso-line-height-rule:exactly;font-family:arial, ''helvetica neue'', helvetica, sans-serif;line-height:42px;letter-spacing:0;color:#333333;font-size:28px !important"><strong>@eventname</strong></p></td>
                     </tr>
                     <tr>
                      <td align="left" class="es-text-4842 es-m-p10l es-m-p10r" style="Margin:0;padding-right:20px;padding-left:20px;padding-top:5px;padding-bottom:25px"><p style="Margin:0;mso-line-height-rule:exactly;font-family:arial, ''helvetica neue'', helvetica, sans-serif;line-height:21px;letter-spacing:0;color:#333333;font-size:14px">@eventdate</p></td>
                     </tr>
                     <tr>
                      <td align="left" class="es-m-p10l es-m-p10r" style="Margin:0;padding-right:20px;padding-left:20px;padding-top:5px;padding-bottom:5px"><p style="Margin:0;mso-line-height-rule:exactly;font-family:arial, ''helvetica neue'', helvetica, sans-serif;line-height:21px;letter-spacing:0;color:#333333;font-size:14px"><strong>Описание</strong></p></td>
                     </tr>
                     <tr>
                      <td align="left" class="es-text-3519 es-m-p10l es-m-p10r" style="padding:0;Margin:0;padding-right:20px;padding-left:20px;padding-bottom:25px"><p style="Margin:0;mso-line-height-rule:exactly;font-family:arial, ''helvetica neue'', helvetica, sans-serif;line-height:21px;letter-spacing:0;color:#333333;font-size:14px">@eventdescription</p></td>
                     </tr>
                     <tr>
                      <td align="left" class="es-m-p10l es-m-p10r" style="Margin:0;padding-right:20px;padding-left:20px;padding-top:5px;padding-bottom:5px"><p style="Margin:0;mso-line-height-rule:exactly;font-family:arial, ''helvetica neue'', helvetica, sans-serif;line-height:21px;letter-spacing:0;color:#333333;font-size:14px"><strong>Местоположение</strong></p></td>
                     </tr>
                     <tr>
                      <td align="left" class="es-text-5889 es-m-p10l es-m-p10r" style="padding:0;Margin:0;padding-right:20px;padding-left:20px;padding-bottom:25px"><p style="Margin:0;mso-line-height-rule:exactly;font-family:arial, ''helvetica neue'', helvetica, sans-serif;line-height:21px;letter-spacing:0;color:#333333;font-size:14px">@eventplace</p></td>
                     </tr>
                     <tr>
                      <td align="left" class="es-m-p10l es-m-p10r" style="Margin:0;padding-right:20px;padding-left:20px;padding-top:5px;padding-bottom:5px"><p style="Margin:0;mso-line-height-rule:exactly;font-family:arial, ''helvetica neue'', helvetica, sans-serif;line-height:21px;letter-spacing:0;color:#333333;font-size:14px"><strong>Гости</strong></p></td>
                     </tr>
                     <tr>
                      <td align="left" class="es-text-8833 es-m-p10l es-m-p10r" style="padding:0;Margin:0;padding-right:20px;padding-left:20px;padding-bottom:20px"><p style="Margin:0;mso-line-height-rule:exactly;font-family:arial, ''helvetica neue'', helvetica, sans-serif;line-height:21px;letter-spacing:0;color:#333333;font-size:14px">@owneremail -&nbsp;<span style="color:#999999">организатор</span>&nbsp;</p><p style="Margin:0;mso-line-height-rule:exactly;font-family:arial, ''helvetica neue'', helvetica, sans-serif;line-height:21px;letter-spacing:0;color:#333333;font-size:14px">@participantsemails</p></td>
                     </tr>
                     <tr>
                      <td align="left" class="es-m-p15t es-m-p15b es-m-txt-c es-m-p0l" style="padding:0;Margin:0;padding-left:20px;padding-bottom:20px;padding-top:20px"><span class="es-button-border" style="border-style:solid;border-color:#2CB543;background:#339AF0;border-width:0px;display:inline-block;border-radius:6px;width:auto"><a href="@eventview" class="es-button es-button-6874" target="_blank" style="mso-style-priority:100 !important;text-decoration:none !important;mso-line-height-rule:exactly;color:#FFFFFF;font-size:14px;padding:15px 40px;display:inline-block;background:#339AF0;border-radius:6px;font-family:arial, ''helvetica neue'', helvetica, sans-serif;font-weight:bold;font-style:normal;line-height:17px !important;width:auto;text-align:center;letter-spacing:0;mso-padding-alt:0;mso-border-alt:10px solid #339AF0;border-left-width:30px;border-right-width:30px">Посмотреть событие</a></span></td>
                     </tr>
                   </table></td>
                 </tr>
               </table></td>
             </tr>
           </table></td>
         </tr>
       </table>
       <table cellpadding="0" cellspacing="0" class="es-header" align="center" style="mso-table-lspace:0pt;mso-table-rspace:0pt;border-collapse:collapse;border-spacing:0px;width:100%;table-layout:fixed !important;background-color:transparent;background-repeat:repeat;background-position:center top">
         <tr>
          <td align="center" style="padding:0;Margin:0">
           <table bgcolor="#ffffff" class="es-header-body" align="center" cellpadding="0" cellspacing="0" style="mso-table-lspace:0pt;mso-table-rspace:0pt;border-collapse:collapse;border-spacing:0px;background-color:transparent;width:600px">
             <tr>
              <td align="left" style="Margin:0;padding-top:10px;padding-right:20px;padding-bottom:10px;padding-left:20px">
               <table cellpadding="0" cellspacing="0" width="100%" style="mso-table-lspace:0pt;mso-table-rspace:0pt;border-collapse:collapse;border-spacing:0px">
                 <tr>
                  <td class="es-m-p0r" valign="top" align="center" style="padding:0;Margin:0;width:560px">
                   <table cellpadding="0" cellspacing="0" width="100%" style="mso-table-lspace:0pt;mso-table-rspace:0pt;border-collapse:collapse;border-spacing:0px">
                     <tr>
                      <td align="left" style="padding:10px;Margin:0;font-size:0"><img class="img-3148" src="" alt="" height="36" style="display:block;font-size:14px;border:0;outline:none;text-decoration:none"></td>
                     </tr>
                   </table></td>
                 </tr>
               </table></td>
             </tr>
           </table></td>
         </tr>
       </table>	   </td>
     </tr>
   </table>
  </div>
 </body>
</html>','')
ON CONFLICT ("Key","Lang") DO UPDATE SET "Value"= EXCLUDED."Value";

INSERT INTO public."MessageSettings"("Key",  "Value", "Lang") VALUES('Email.OneHour|Subject' ,N'Notification: {0} — {1}','en')
ON CONFLICT ("Key","Lang") DO UPDATE SET "Value"= EXCLUDED."Value";

INSERT INTO public."MessageSettings"("Key",  "Value", "Lang") VALUES('Email.OneHour|BodyHtml' ,N'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:o="urn:schemas-microsoft-com:office:office">
 <head>
  <meta charset="UTF-8">
  <meta content="width=device-width, initial-scale=1" name="viewport">
  <meta name="x-apple-disable-message-reformatting">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta content="telephone=no" name="format-detection">
  <title>Notification of an upcoming event</title><!--[if (mso 16)]>
    <style type="text/css">
    a {text-decoration: none;}
    </style>
    <![endif]--><!--[if gte mso 9]><style>sup { font-size: 100% !important; }</style><![endif]--><!--[if gte mso 9]>
<xml>
    <o:OfficeDocumentSettings>
    <o:AllowPNG></o:AllowPNG>
    <o:PixelsPerInch>96</o:PixelsPerInch>
    </o:OfficeDocumentSettings>
</xml>
<![endif]-->
  <style type="text/css">
.rollover:hover .rollover-first {
  max-height:0px!important;
  display:none!important;
  }
  .rollover:hover .rollover-second {
  max-height:none!important;
  display:inline-block!important;
  }
  .rollover div {
  font-size:0px;
  }
  u ~ div img + div > div {
  display:none;
  }
  #outlook a {
  padding:0;
  }
  span.MsoHyperlink,
span.MsoHyperlinkFollowed {
  color:inherit;
  mso-style-priority:99;
  }
  a.es-button {
  mso-style-priority:100!important;
  text-decoration:none!important;
  }
  a[x-apple-data-detectors] {
  color:inherit!important;
  text-decoration:none!important;
  font-size:inherit!important;
  font-family:inherit!important;
  font-weight:inherit!important;
  line-height:inherit!important;
  }
  .es-desk-hidden {
  display:none;
  float:left;
  overflow:hidden;
  width:0;
  max-height:0;
  line-height:0;
  mso-hide:all;
  }
  .es-button-border:hover > a.es-button {
  color:#ffffff!important;
  }
@media only screen and (max-width:600px) {*[class="gmail-fix"] { display:none!important } p, a { line-height:150%!important } h1, h1 a { line-height:120%!important } h2, h2 a { line-height:120%!important } h3, h3 a { line-height:120%!important } h4, h4 a { line-height:120%!important } h5, h5 a { line-height:120%!important } h6, h6 a { line-height:120%!important } h1 { font-size:36px!important; text-align:left } h2 { font-size:26px!important; text-align:left } h3 { font-size:20px!important; text-align:left } h4 { font-size:24px!important; text-align:left } h5 { font-size:20px!important; text-align:left } h6 { font-size:16px!important; text-align:left } .es-header-body h1 a, .es-content-body h1 a, .es-footer-body h1 a { font-size:36px!important } .es-header-body h2 a, .es-content-body h2 a, .es-footer-body h2 a { font-size:26px!important } .es-header-body h3 a, .es-content-body h3 a, .es-footer-body h3 a { font-size:20px!important } .es-header-body h4 a, .es-content-body h4 a, .es-footer-body h4 a { font-size:24px!important } .es-header-body h5 a, .es-content-body h5 a, .es-footer-body h5 a { font-size:20px!important } .es-header-body h6 a, .es-content-body h6 a, .es-footer-body h6 a { font-size:16px!important } .es-menu td a { font-size:12px!important } .es-header-body p, .es-header-body a { font-size:14px!important } .es-content-body p, .es-content-body a { font-size:16px!important } .es-footer-body p, .es-footer-body a { font-size:14px!important } .es-infoblock p, .es-infoblock a { font-size:12px!important } .es-m-txt-c, .es-m-txt-c h1, .es-m-txt-c h2, .es-m-txt-c h3, .es-m-txt-c h4, .es-m-txt-c h5, .es-m-txt-c h6 { text-align:center!important } .es-m-txt-r, .es-m-txt-r h1, .es-m-txt-r h2, .es-m-txt-r h3, .es-m-txt-r h4, .es-m-txt-r h5, .es-m-txt-r h6 { text-align:right!important } .es-m-txt-j, .es-m-txt-j h1, .es-m-txt-j h2, .es-m-txt-j h3, .es-m-txt-j h4, .es-m-txt-j h5, .es-m-txt-j h6 { text-align:justify!important } .es-m-txt-l, .es-m-txt-l h1, .es-m-txt-l h2, .es-m-txt-l h3, .es-m-txt-l h4, .es-m-txt-l h5, .es-m-txt-l h6 { text-align:left!important } .es-m-txt-r img, .es-m-txt-c img, .es-m-txt-l img { display:inline!important } .es-m-txt-r .rollover:hover .rollover-second, .es-m-txt-c .rollover:hover .rollover-second, .es-m-txt-l .rollover:hover .rollover-second { display:inline!important } .es-m-txt-r .rollover div, .es-m-txt-c .rollover div, .es-m-txt-l .rollover div { line-height:0!important; font-size:0!important } .es-spacer { display:inline-table } a.es-button, button.es-button { font-size:20px!important } a.es-button, button.es-button { display:inline-block!important } .es-button-border { display:inline-block!important } .es-m-fw, .es-m-fw.es-fw, .es-m-fw .es-button { display:block!important } .es-m-il, .es-m-il .es-button, .es-social, .es-social td, .es-menu { display:inline-block!important } .es-adaptive table, .es-left, .es-right { width:100%!important } .es-content table, .es-header table, .es-footer table, .es-content, .es-footer, .es-header { width:100%!important; max-width:600px!important } .adapt-img { width:100%!important; height:auto!important } .es-mobile-hidden, .es-hidden { display:none!important } .es-desk-hidden { width:auto!important; overflow:visible!important; float:none!important; max-height:inherit!important; line-height:inherit!important } tr.es-desk-hidden { display:table-row!important } table.es-desk-hidden { display:table!important } td.es-desk-menu-hidden { display:table-cell!important } .es-menu td { width:1%!important } table.es-table-not-adapt, .esd-block-html table { width:auto!important } .es-social td { padding-bottom:10px } .h-auto { height:auto!important } a.es-button.es-button-6874 { font-size:14px!important } .img-3148 { height:36px!important } .es-text-2975, .es-text-2975 p, .es-text-2975 a, .es-text-2975 h1, .es-text-2975 h2, .es-text-2975 h3, .es-text-2975 h4, .es-text-2975 h5, .es-text-2975 h6, .es-text-2975 ul, .es-text-2975 ol { font-size:14px!important } .es-text-4842, .es-text-4842 p, .es-text-4842 a, .es-text-4842 h1, .es-text-4842 h2, .es-text-4842 h3, .es-text-4842 h4, .es-text-4842 h5, .es-text-4842 h6, .es-text-4842 ul, .es-text-4842 ol { font-size:14px!important } .es-text-3519, .es-text-3519 p, .es-text-3519 a, .es-text-3519 h1, .es-text-3519 h2, .es-text-3519 h3, .es-text-3519 h4, .es-text-3519 h5, .es-text-3519 h6, .es-text-3519 ul, .es-text-3519 ol { font-size:14px!important } .es-text-5889, .es-text-5889 p, .es-text-5889 a, .es-text-5889 h1, .es-text-5889 h2, .es-text-5889 h3, .es-text-5889 h4, .es-text-5889 h5, .es-text-5889 h6, .es-text-5889 ul, .es-text-5889 ol { font-size:14px!important } .es-text-8833, .es-text-8833 p, .es-text-8833 a, .es-text-8833 h1, .es-text-8833 h2, .es-text-8833 h3, .es-text-8833 h4, .es-text-8833 h5, .es-text-8833 h6, .es-text-8833 ul, .es-text-8833 ol { font-size:14px!important } }
</style>
 </head>
 <body style="width:100%;height:100%;padding:0;Margin:0">
  <div class="es-wrapper-color" style="background-color:#FAFAFA"><!--[if gte mso 9]>
			<v:background xmlns:v="urn:schemas-microsoft-com:vml" fill="t">
				<v:fill type="tile" color="#fafafa"></v:fill>
			</v:background>
		<![endif]-->
   <table class="es-wrapper" width="100%" cellspacing="0" cellpadding="0" style="mso-table-lspace:0pt;mso-table-rspace:0pt;border-collapse:collapse;border-spacing:0px;padding:0;Margin:0;width:100%;height:100%;background-repeat:repeat;background-position:center top;background-color:#f5f5f5">
     <tr>
      <td valign="top" style="padding:0;Margin:0">
       <table cellpadding="0" cellspacing="0" class="es-header" align="center" style="mso-table-lspace:0pt;mso-table-rspace:0pt;border-collapse:collapse;border-spacing:0px;width:100%;table-layout:fixed !important;background-color:transparent;background-repeat:repeat;background-position:center top">
         <tr>
          <td align="center" style="padding:0;Margin:0">
           <table bgcolor="#ffffff" class="es-header-body" align="center" cellpadding="0" cellspacing="0" style="mso-table-lspace:0pt;mso-table-rspace:0pt;border-collapse:collapse;border-spacing:0px;background-color:transparent;width:600px">
             <tr>
              <td align="left" style="Margin:0;padding-top:10px;padding-right:20px;padding-bottom:10px;padding-left:20px">
               <table cellpadding="0" cellspacing="0" width="100%" style="mso-table-lspace:0pt;mso-table-rspace:0pt;border-collapse:collapse;border-spacing:0px">
                 <tr>
                  <td class="es-m-p0r" valign="top" align="center" style="padding:0;Margin:0;width:560px">
                   <table cellpadding="0" cellspacing="0" width="100%" style="mso-table-lspace:0pt;mso-table-rspace:0pt;border-collapse:collapse;border-spacing:0px">
                     <tr>
                      <td align="left" style="padding:10px;Margin:0;font-size:0"><img class="img-3148" src="@eventimage" alt="" height="36" style="display:block;font-size:14px;border:0;outline:none;text-decoration:none"></td>
                     </tr>
                   </table></td>
                 </tr>
               </table></td>
             </tr>
           </table></td>
         </tr>
       </table>
       <table cellpadding="0" cellspacing="0" class="es-content" align="center" style="mso-table-lspace:0pt;mso-table-rspace:0pt;border-collapse:collapse;border-spacing:0px;width:100%;table-layout:fixed !important">
         <tr>
          <td align="center" style="padding:0;Margin:0">
           <table bgcolor="transparent" class="es-content-body" align="center" cellpadding="0" cellspacing="0" style="mso-table-lspace:0pt;mso-table-rspace:0pt;border-collapse:separate;border-spacing:0px;background-color:transparent;width:600px;border-width:0">
             <tr>
              <td align="left" style="Margin:0;padding-right:20px;padding-left:20px;padding-top:30px;padding-bottom:30px;border-radius:32px;background-color:#ffffff" bgcolor="#ffffff">
               <table cellpadding="0" cellspacing="0" width="100%" style="mso-table-lspace:0pt;mso-table-rspace:0pt;border-collapse:collapse;border-spacing:0px">
                 <tr>
                  <td align="center" valign="top" style="padding:0;Margin:0;width:560px">
                   <table cellpadding="0" cellspacing="0" width="100%" style="mso-table-lspace:0pt;mso-table-rspace:0pt;border-collapse:collapse;border-spacing:0px">
                     <tr>
                      <td align="left" class="es-text-2975 es-m-p10l es-m-p10r" style="padding:0;Margin:0;padding-right:20px;padding-left:20px;font-size:28px !important"><p style="Margin:0;mso-line-height-rule:exactly;font-family:arial, ''helvetica neue'', helvetica, sans-serif;line-height:42px;letter-spacing:0;color:#333333;font-size:28px !important"><strong>@eventname</strong></p></td>
                     </tr>
                     <tr>
                      <td align="left" class="es-text-4842 es-m-p10l es-m-p10r" style="Margin:0;padding-right:20px;padding-left:20px;padding-top:5px;padding-bottom:25px"><p style="Margin:0;mso-line-height-rule:exactly;font-family:arial, ''helvetica neue'', helvetica, sans-serif;line-height:21px;letter-spacing:0;color:#333333;font-size:14px">@eventdate</p></td>
                     </tr>
                     <tr>
                      <td align="left" class="es-m-p10l es-m-p10r" style="Margin:0;padding-right:20px;padding-left:20px;padding-top:5px;padding-bottom:5px"><p style="Margin:0;mso-line-height-rule:exactly;font-family:arial, ''helvetica neue'', helvetica, sans-serif;line-height:21px;letter-spacing:0;color:#333333;font-size:14px"><strong>Description</strong></p></td>
                     </tr>
                     <tr>
                      <td align="left" class="es-text-3519 es-m-p10l es-m-p10r" style="padding:0;Margin:0;padding-right:20px;padding-left:20px;padding-bottom:25px"><p style="Margin:0;mso-line-height-rule:exactly;font-family:arial, ''helvetica neue'', helvetica, sans-serif;line-height:21px;letter-spacing:0;color:#333333;font-size:14px">@eventdescription</p></td>
                     </tr>
                     <tr>
                      <td align="left" class="es-m-p10l es-m-p10r" style="Margin:0;padding-right:20px;padding-left:20px;padding-top:5px;padding-bottom:5px"><p style="Margin:0;mso-line-height-rule:exactly;font-family:arial, ''helvetica neue'', helvetica, sans-serif;line-height:21px;letter-spacing:0;color:#333333;font-size:14px"><strong>Place</strong></p></td>
                     </tr>
                     <tr>
                      <td align="left" class="es-text-5889 es-m-p10l es-m-p10r" style="padding:0;Margin:0;padding-right:20px;padding-left:20px;padding-bottom:25px"><p style="Margin:0;mso-line-height-rule:exactly;font-family:arial, ''helvetica neue'', helvetica, sans-serif;line-height:21px;letter-spacing:0;color:#333333;font-size:14px">@eventplace</p></td>
                     </tr>
                     <tr>
                      <td align="left" class="es-m-p10l es-m-p10r" style="Margin:0;padding-right:20px;padding-left:20px;padding-top:5px;padding-bottom:5px"><p style="Margin:0;mso-line-height-rule:exactly;font-family:arial, ''helvetica neue'', helvetica, sans-serif;line-height:21px;letter-spacing:0;color:#333333;font-size:14px"><strong>Guests</strong></p></td>
                     </tr>
                     <tr>
                      <td align="left" class="es-text-8833 es-m-p10l es-m-p10r" style="padding:0;Margin:0;padding-right:20px;padding-left:20px;padding-bottom:20px"><p style="Margin:0;mso-line-height-rule:exactly;font-family:arial, ''helvetica neue'', helvetica, sans-serif;line-height:21px;letter-spacing:0;color:#333333;font-size:14px">@owneremail -&nbsp;<span style="color:#999999">organizer</span>&nbsp;</p><p style="Margin:0;mso-line-height-rule:exactly;font-family:arial, ''helvetica neue'', helvetica, sans-serif;line-height:21px;letter-spacing:0;color:#333333;font-size:14px">@participantsemails</p></td>
                     </tr>
                     <tr>
                      <td align="left" class="es-m-p15t es-m-p15b es-m-txt-c es-m-p0l" style="padding:0;Margin:0;padding-left:20px;padding-bottom:20px;padding-top:20px"><span class="es-button-border" style="border-style:solid;border-color:#2CB543;background:#339AF0;border-width:0px;display:inline-block;border-radius:6px;width:auto"><a href="@eventview" class="es-button es-button-6874" target="_blank" style="mso-style-priority:100 !important;text-decoration:none !important;mso-line-height-rule:exactly;color:#FFFFFF;font-size:14px;padding:15px 40px;display:inline-block;background:#339AF0;border-radius:6px;font-family:arial, ''helvetica neue'', helvetica, sans-serif;font-weight:bold;font-style:normal;line-height:17px !important;width:auto;text-align:center;letter-spacing:0;mso-padding-alt:0;mso-border-alt:10px solid #339AF0;border-left-width:30px;border-right-width:30px">View an event</a></span></td>
                     </tr>
                   </table></td>
                 </tr>
               </table></td>
             </tr>
           </table></td>
         </tr>
       </table>
       <table cellpadding="0" cellspacing="0" class="es-header" align="center" style="mso-table-lspace:0pt;mso-table-rspace:0pt;border-collapse:collapse;border-spacing:0px;width:100%;table-layout:fixed !important;background-color:transparent;background-repeat:repeat;background-position:center top">
         <tr>
          <td align="center" style="padding:0;Margin:0">
           <table bgcolor="#ffffff" class="es-header-body" align="center" cellpadding="0" cellspacing="0" style="mso-table-lspace:0pt;mso-table-rspace:0pt;border-collapse:collapse;border-spacing:0px;background-color:transparent;width:600px">
             <tr>
              <td align="left" style="Margin:0;padding-top:10px;padding-right:20px;padding-bottom:10px;padding-left:20px">
               <table cellpadding="0" cellspacing="0" width="100%" style="mso-table-lspace:0pt;mso-table-rspace:0pt;border-collapse:collapse;border-spacing:0px">
                 <tr>
                  <td class="es-m-p0r" valign="top" align="center" style="padding:0;Margin:0;width:560px">
                   <table cellpadding="0" cellspacing="0" width="100%" style="mso-table-lspace:0pt;mso-table-rspace:0pt;border-collapse:collapse;border-spacing:0px">
                     <tr>
                      <td align="left" style="padding:10px;Margin:0;font-size:0"><img class="img-3148" src="" alt="" height="36" style="display:block;font-size:14px;border:0;outline:none;text-decoration:none"></td>
                     </tr>
                   </table></td>
                 </tr>
               </table></td>
             </tr>
           </table></td>
         </tr>
       </table>	   </td>
     </tr>
   </table>
  </div>
 </body>
</html>','en')
ON CONFLICT ("Key","Lang") DO UPDATE SET "Value"= EXCLUDED."Value";

INSERT INTO public."MessageSettings"("Key",  "Value", "Lang") VALUES('Email.EventInvite|Subject' ,N'Приглашение: {0} — {1} ({2})','')
ON CONFLICT ("Key","Lang") DO UPDATE SET "Value"= EXCLUDED."Value";

INSERT INTO public."MessageSettings"("Key",  "Value", "Lang") VALUES('Email.EventInvite|BodyHtml' ,N'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:o="urn:schemas-microsoft-com:office:office">
 <head>
  <meta charset="UTF-8">
  <meta content="width=device-width, initial-scale=1" name="viewport">
  <meta name="x-apple-disable-message-reformatting">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta content="telephone=no" name="format-detection">
  <title>Уведомление о приближающемся событии</title><!--[if (mso 16)]>
    <style type="text/css">
    a {text-decoration: none;}
    </style>
    <![endif]--><!--[if gte mso 9]><style>sup { font-size: 100% !important; }</style><![endif]--><!--[if gte mso 9]>
<xml>
    <o:OfficeDocumentSettings>
    <o:AllowPNG></o:AllowPNG>
    <o:PixelsPerInch>96</o:PixelsPerInch>
    </o:OfficeDocumentSettings>
</xml>
<![endif]-->
  <style type="text/css">
.rollover:hover .rollover-first {
  max-height:0px!important;
  display:none!important;
  }
  .rollover:hover .rollover-second {
  max-height:none!important;
  display:inline-block!important;
  }
  .rollover div {
  font-size:0px;
  }
  u ~ div img + div > div {
  display:none;
  }
  #outlook a {
  padding:0;
  }
  span.MsoHyperlink,
span.MsoHyperlinkFollowed {
  color:inherit;
  mso-style-priority:99;
  }
  a.es-button {
  mso-style-priority:100!important;
  text-decoration:none!important;
  }
  a[x-apple-data-detectors] {
  color:inherit!important;
  text-decoration:none!important;
  font-size:inherit!important;
  font-family:inherit!important;
  font-weight:inherit!important;
  line-height:inherit!important;
  }
  .es-desk-hidden {
  display:none;
  float:left;
  overflow:hidden;
  width:0;
  max-height:0;
  line-height:0;
  mso-hide:all;
  }
  .es-button-border:hover > a.es-button {
  color:#ffffff!important;
  }
@media only screen and (max-width:600px) {*[class="gmail-fix"] { display:none!important } p, a { line-height:150%!important } h1, h1 a { line-height:120%!important } h2, h2 a { line-height:120%!important } h3, h3 a { line-height:120%!important } h4, h4 a { line-height:120%!important } h5, h5 a { line-height:120%!important } h6, h6 a { line-height:120%!important } h1 { font-size:36px!important; text-align:left } h2 { font-size:26px!important; text-align:left } h3 { font-size:20px!important; text-align:left } h4 { font-size:24px!important; text-align:left } h5 { font-size:20px!important; text-align:left } h6 { font-size:16px!important; text-align:left } .es-header-body h1 a, .es-content-body h1 a, .es-footer-body h1 a { font-size:36px!important } .es-header-body h2 a, .es-content-body h2 a, .es-footer-body h2 a { font-size:26px!important } .es-header-body h3 a, .es-content-body h3 a, .es-footer-body h3 a { font-size:20px!important } .es-header-body h4 a, .es-content-body h4 a, .es-footer-body h4 a { font-size:24px!important } .es-header-body h5 a, .es-content-body h5 a, .es-footer-body h5 a { font-size:20px!important } .es-header-body h6 a, .es-content-body h6 a, .es-footer-body h6 a { font-size:16px!important } .es-menu td a { font-size:12px!important } .es-header-body p, .es-header-body a { font-size:14px!important } .es-content-body p, .es-content-body a { font-size:16px!important } .es-footer-body p, .es-footer-body a { font-size:14px!important } .es-infoblock p, .es-infoblock a { font-size:12px!important } .es-m-txt-c, .es-m-txt-c h1, .es-m-txt-c h2, .es-m-txt-c h3, .es-m-txt-c h4, .es-m-txt-c h5, .es-m-txt-c h6 { text-align:center!important } .es-m-txt-r, .es-m-txt-r h1, .es-m-txt-r h2, .es-m-txt-r h3, .es-m-txt-r h4, .es-m-txt-r h5, .es-m-txt-r h6 { text-align:right!important } .es-m-txt-j, .es-m-txt-j h1, .es-m-txt-j h2, .es-m-txt-j h3, .es-m-txt-j h4, .es-m-txt-j h5, .es-m-txt-j h6 { text-align:justify!important } .es-m-txt-l, .es-m-txt-l h1, .es-m-txt-l h2, .es-m-txt-l h3, .es-m-txt-l h4, .es-m-txt-l h5, .es-m-txt-l h6 { text-align:left!important } .es-m-txt-r img, .es-m-txt-c img, .es-m-txt-l img { display:inline!important } .es-m-txt-r .rollover:hover .rollover-second, .es-m-txt-c .rollover:hover .rollover-second, .es-m-txt-l .rollover:hover .rollover-second { display:inline!important } .es-m-txt-r .rollover div, .es-m-txt-c .rollover div, .es-m-txt-l .rollover div { line-height:0!important; font-size:0!important } .es-spacer { display:inline-table } a.es-button, button.es-button { font-size:20px!important } a.es-button, button.es-button { display:inline-block!important } .es-button-border { display:inline-block!important } .es-m-fw, .es-m-fw.es-fw, .es-m-fw .es-button { display:block!important } .es-m-il, .es-m-il .es-button, .es-social, .es-social td, .es-menu { display:inline-block!important } .es-adaptive table, .es-left, .es-right { width:100%!important } .es-content table, .es-header table, .es-footer table, .es-content, .es-footer, .es-header { width:100%!important; max-width:600px!important } .adapt-img { width:100%!important; height:auto!important } .es-mobile-hidden, .es-hidden { display:none!important } .es-desk-hidden { width:auto!important; overflow:visible!important; float:none!important; max-height:inherit!important; line-height:inherit!important } tr.es-desk-hidden { display:table-row!important } table.es-desk-hidden { display:table!important } td.es-desk-menu-hidden { display:table-cell!important } .es-menu td { width:1%!important } table.es-table-not-adapt, .esd-block-html table { width:auto!important } .es-social td { padding-bottom:10px } .h-auto { height:auto!important } a.es-button.es-button-6874 { font-size:14px!important } .img-3148 { height:36px!important } .es-text-2975, .es-text-2975 p, .es-text-2975 a, .es-text-2975 h1, .es-text-2975 h2, .es-text-2975 h3, .es-text-2975 h4, .es-text-2975 h5, .es-text-2975 h6, .es-text-2975 ul, .es-text-2975 ol { font-size:14px!important } .es-text-4842, .es-text-4842 p, .es-text-4842 a, .es-text-4842 h1, .es-text-4842 h2, .es-text-4842 h3, .es-text-4842 h4, .es-text-4842 h5, .es-text-4842 h6, .es-text-4842 ul, .es-text-4842 ol { font-size:14px!important } .es-text-3519, .es-text-3519 p, .es-text-3519 a, .es-text-3519 h1, .es-text-3519 h2, .es-text-3519 h3, .es-text-3519 h4, .es-text-3519 h5, .es-text-3519 h6, .es-text-3519 ul, .es-text-3519 ol { font-size:14px!important } .es-text-5889, .es-text-5889 p, .es-text-5889 a, .es-text-5889 h1, .es-text-5889 h2, .es-text-5889 h3, .es-text-5889 h4, .es-text-5889 h5, .es-text-5889 h6, .es-text-5889 ul, .es-text-5889 ol { font-size:14px!important } .es-text-8833, .es-text-8833 p, .es-text-8833 a, .es-text-8833 h1, .es-text-8833 h2, .es-text-8833 h3, .es-text-8833 h4, .es-text-8833 h5, .es-text-8833 h6, .es-text-8833 ul, .es-text-8833 ol { font-size:14px!important } }
</style>
 </head>
 <body style="width:100%;height:100%;padding:0;Margin:0">
  <div class="es-wrapper-color" style="background-color:#FAFAFA"><!--[if gte mso 9]>
			<v:background xmlns:v="urn:schemas-microsoft-com:vml" fill="t">
				<v:fill type="tile" color="#fafafa"></v:fill>
			</v:background>
		<![endif]-->
   <table class="es-wrapper" width="100%" cellspacing="0" cellpadding="0" style="mso-table-lspace:0pt;mso-table-rspace:0pt;border-collapse:collapse;border-spacing:0px;padding:0;Margin:0;width:100%;height:100%;background-repeat:repeat;background-position:center top;background-color:#f5f5f5">
     <tr>
      <td valign="top" style="padding:0;Margin:0">
       <table cellpadding="0" cellspacing="0" class="es-header" align="center" style="mso-table-lspace:0pt;mso-table-rspace:0pt;border-collapse:collapse;border-spacing:0px;width:100%;table-layout:fixed !important;background-color:transparent;background-repeat:repeat;background-position:center top">
         <tr>
          <td align="center" style="padding:0;Margin:0">
           <table bgcolor="#ffffff" class="es-header-body" align="center" cellpadding="0" cellspacing="0" style="mso-table-lspace:0pt;mso-table-rspace:0pt;border-collapse:collapse;border-spacing:0px;background-color:transparent;width:600px">
             <tr>
              <td align="left" style="Margin:0;padding-top:10px;padding-right:20px;padding-bottom:10px;padding-left:20px">
               <table cellpadding="0" cellspacing="0" width="100%" style="mso-table-lspace:0pt;mso-table-rspace:0pt;border-collapse:collapse;border-spacing:0px">
                 <tr>
                  <td class="es-m-p0r" valign="top" align="center" style="padding:0;Margin:0;width:560px">
                   <table cellpadding="0" cellspacing="0" width="100%" style="mso-table-lspace:0pt;mso-table-rspace:0pt;border-collapse:collapse;border-spacing:0px">
                     <tr>
                      <td align="left" style="padding:10px;Margin:0;font-size:0"><img class="img-3148" src="@eventimage" alt="" height="36" style="display:block;font-size:14px;border:0;outline:none;text-decoration:none"></td>
                     </tr>
                   </table></td>
                 </tr>
               </table></td>
             </tr>
           </table></td>
         </tr>
       </table>
       <table cellpadding="0" cellspacing="0" class="es-content" align="center" style="mso-table-lspace:0pt;mso-table-rspace:0pt;border-collapse:collapse;border-spacing:0px;width:100%;table-layout:fixed !important">
         <tr>
          <td align="center" style="padding:0;Margin:0">
           <table bgcolor="transparent" class="es-content-body" align="center" cellpadding="0" cellspacing="0" style="mso-table-lspace:0pt;mso-table-rspace:0pt;border-collapse:separate;border-spacing:0px;background-color:transparent;width:600px;border-width:0">
             <tr>
              <td align="left" style="Margin:0;padding-right:20px;padding-left:20px;padding-top:30px;padding-bottom:30px;border-radius:32px;background-color:#ffffff" bgcolor="#ffffff">
               <table cellpadding="0" cellspacing="0" width="100%" style="mso-table-lspace:0pt;mso-table-rspace:0pt;border-collapse:collapse;border-spacing:0px">
                 <tr>
                  <td align="center" valign="top" style="padding:0;Margin:0;width:560px">
                   <table cellpadding="0" cellspacing="0" width="100%" style="mso-table-lspace:0pt;mso-table-rspace:0pt;border-collapse:collapse;border-spacing:0px">
                     <tr>
                      <td align="left" class="es-text-2975 es-m-p10l es-m-p10r" style="padding:0;Margin:0;padding-right:20px;padding-left:20px;font-size:28px !important"><p style="Margin:0;mso-line-height-rule:exactly;font-family:arial, ''helvetica neue'', helvetica, sans-serif;line-height:42px;letter-spacing:0;color:#333333;font-size:28px !important"><strong>@eventname</strong></p></td>
                     </tr>
                     <tr>
                      <td align="left" class="es-text-4842 es-m-p10l es-m-p10r" style="Margin:0;padding-right:20px;padding-left:20px;padding-top:5px;padding-bottom:25px"><p style="Margin:0;mso-line-height-rule:exactly;font-family:arial, ''helvetica neue'', helvetica, sans-serif;line-height:21px;letter-spacing:0;color:#333333;font-size:14px">@eventdate</p></td>
                     </tr>
                     <tr>
                      <td align="left" class="es-m-p10l es-m-p10r" style="Margin:0;padding-right:20px;padding-left:20px;padding-top:5px;padding-bottom:5px"><p style="Margin:0;mso-line-height-rule:exactly;font-family:arial, ''helvetica neue'', helvetica, sans-serif;line-height:21px;letter-spacing:0;color:#333333;font-size:14px"><strong>Описание</strong></p></td>
                     </tr>
                     <tr>
                      <td align="left" class="es-text-3519 es-m-p10l es-m-p10r" style="padding:0;Margin:0;padding-right:20px;padding-left:20px;padding-bottom:25px"><p style="Margin:0;mso-line-height-rule:exactly;font-family:arial, ''helvetica neue'', helvetica, sans-serif;line-height:21px;letter-spacing:0;color:#333333;font-size:14px">@eventdescription</p></td>
                     </tr>
                     <tr>
                      <td align="left" class="es-m-p10l es-m-p10r" style="Margin:0;padding-right:20px;padding-left:20px;padding-top:5px;padding-bottom:5px"><p style="Margin:0;mso-line-height-rule:exactly;font-family:arial, ''helvetica neue'', helvetica, sans-serif;line-height:21px;letter-spacing:0;color:#333333;font-size:14px"><strong>Местоположение</strong></p></td>
                     </tr>
                     <tr>
                      <td align="left" class="es-text-5889 es-m-p10l es-m-p10r" style="padding:0;Margin:0;padding-right:20px;padding-left:20px;padding-bottom:25px"><p style="Margin:0;mso-line-height-rule:exactly;font-family:arial, ''helvetica neue'', helvetica, sans-serif;line-height:21px;letter-spacing:0;color:#333333;font-size:14px">@eventplace</p></td>
                     </tr>
                     <tr>
                      <td align="left" class="es-m-p10l es-m-p10r" style="Margin:0;padding-right:20px;padding-left:20px;padding-top:5px;padding-bottom:5px"><p style="Margin:0;mso-line-height-rule:exactly;font-family:arial, ''helvetica neue'', helvetica, sans-serif;line-height:21px;letter-spacing:0;color:#333333;font-size:14px"><strong>Гости</strong></p></td>
                     </tr>
                     <tr>
                      <td align="left" class="es-text-8833 es-m-p10l es-m-p10r" style="padding:0;Margin:0;padding-right:20px;padding-left:20px;padding-bottom:20px"><p style="Margin:0;mso-line-height-rule:exactly;font-family:arial, ''helvetica neue'', helvetica, sans-serif;line-height:21px;letter-spacing:0;color:#333333;font-size:14px">@owneremail -&nbsp;<span style="color:#999999">организатор</span>&nbsp;</p><p style="Margin:0;mso-line-height-rule:exactly;font-family:arial, ''helvetica neue'', helvetica, sans-serif;line-height:21px;letter-spacing:0;color:#333333;font-size:14px">@participantsemails</p></td>
                     </tr>
                     <tr>
                      <td align="left" class="es-m-p15t es-m-p15b es-m-txt-c es-m-p0l" style="padding:0;Margin:0;padding-left:20px;padding-bottom:20px;padding-top:20px"><span class="es-button-border" style="border-style:solid;border-color:#2CB543;background:#339AF0;border-width:0px;display:inline-block;border-radius:6px;width:auto"><a href="@eventview" class="es-button es-button-6874" target="_blank" style="mso-style-priority:100 !important;text-decoration:none !important;mso-line-height-rule:exactly;color:#FFFFFF;font-size:14px;padding:15px 40px;display:inline-block;background:#339AF0;border-radius:6px;font-family:arial, ''helvetica neue'', helvetica, sans-serif;font-weight:bold;font-style:normal;line-height:17px !important;width:auto;text-align:center;letter-spacing:0;mso-padding-alt:0;mso-border-alt:10px solid #339AF0;border-left-width:30px;border-right-width:30px">Посмотреть событие</a></span></td>
                     </tr>
                   </table></td>
                 </tr>
               </table></td>
             </tr>
           </table></td>
         </tr>
       </table>
       <table cellpadding="0" cellspacing="0" class="es-header" align="center" style="mso-table-lspace:0pt;mso-table-rspace:0pt;border-collapse:collapse;border-spacing:0px;width:100%;table-layout:fixed !important;background-color:transparent;background-repeat:repeat;background-position:center top">
         <tr>
          <td align="center" style="padding:0;Margin:0">
           <table bgcolor="#ffffff" class="es-header-body" align="center" cellpadding="0" cellspacing="0" style="mso-table-lspace:0pt;mso-table-rspace:0pt;border-collapse:collapse;border-spacing:0px;background-color:transparent;width:600px">
             <tr>
              <td align="left" style="Margin:0;padding-top:10px;padding-right:20px;padding-bottom:10px;padding-left:20px">
               <table cellpadding="0" cellspacing="0" width="100%" style="mso-table-lspace:0pt;mso-table-rspace:0pt;border-collapse:collapse;border-spacing:0px">
                 <tr>
                  <td class="es-m-p0r" valign="top" align="center" style="padding:0;Margin:0;width:560px">
                   <table cellpadding="0" cellspacing="0" width="100%" style="mso-table-lspace:0pt;mso-table-rspace:0pt;border-collapse:collapse;border-spacing:0px">
                     <tr>
                      <td align="left" style="padding:10px;Margin:0;font-size:0"><img class="img-3148" src="" alt="" height="36" style="display:block;font-size:14px;border:0;outline:none;text-decoration:none"></td>
                     </tr>
                   </table></td>
                 </tr>
               </table></td>
             </tr>
           </table></td>
         </tr>
       </table>	   </td>
     </tr>
   </table>
  </div>
 </body>
</html>','')
ON CONFLICT ("Key","Lang") DO UPDATE SET "Value"= EXCLUDED."Value";

--Нотификация изменения эвента
INSERT INTO public."MessageSettings"("Key",  "Value", "Lang") VALUES('Email.ChangeEvent|Subject' ,N'Изменение в событии: {0} — {1}','')
ON CONFLICT ("Key","Lang") DO UPDATE SET "Value"= EXCLUDED."Value";

INSERT INTO public."MessageSettings"("Key",  "Value", "Lang") VALUES('Email.ChangeEvent|BodyHtml' ,N'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:o="urn:schemas-microsoft-com:office:office">
 <head>
  <meta charset="UTF-8">
  <meta content="width=device-width, initial-scale=1" name="viewport">
  <meta name="x-apple-disable-message-reformatting">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta content="telephone=no" name="format-detection">
  <title>Уведомление о приближающемся событии</title><!--[if (mso 16)]>
    <style type="text/css">
    a {text-decoration: none;}
    </style>
    <![endif]--><!--[if gte mso 9]><style>sup { font-size: 100% !important; }</style><![endif]--><!--[if gte mso 9]>
<xml>
    <o:OfficeDocumentSettings>
    <o:AllowPNG></o:AllowPNG>
    <o:PixelsPerInch>96</o:PixelsPerInch>
    </o:OfficeDocumentSettings>
</xml>
<![endif]-->
  <style type="text/css">
.rollover:hover .rollover-first {
  max-height:0px!important;
  display:none!important;
  }
  .rollover:hover .rollover-second {
  max-height:none!important;
  display:inline-block!important;
  }
  .rollover div {
  font-size:0px;
  }
  u ~ div img + div > div {
  display:none;
  }
  #outlook a {
  padding:0;
  }
  span.MsoHyperlink,
span.MsoHyperlinkFollowed {
  color:inherit;
  mso-style-priority:99;
  }
  a.es-button {
  mso-style-priority:100!important;
  text-decoration:none!important;
  }
  a[x-apple-data-detectors] {
  color:inherit!important;
  text-decoration:none!important;
  font-size:inherit!important;
  font-family:inherit!important;
  font-weight:inherit!important;
  line-height:inherit!important;
  }
  .es-desk-hidden {
  display:none;
  float:left;
  overflow:hidden;
  width:0;
  max-height:0;
  line-height:0;
  mso-hide:all;
  }
  .es-button-border:hover > a.es-button {
  color:#ffffff!important;
  }
@media only screen and (max-width:600px) {*[class="gmail-fix"] { display:none!important } p, a { line-height:150%!important } h1, h1 a { line-height:120%!important } h2, h2 a { line-height:120%!important } h3, h3 a { line-height:120%!important } h4, h4 a { line-height:120%!important } h5, h5 a { line-height:120%!important } h6, h6 a { line-height:120%!important } h1 { font-size:36px!important; text-align:left } h2 { font-size:26px!important; text-align:left } h3 { font-size:20px!important; text-align:left } h4 { font-size:24px!important; text-align:left } h5 { font-size:20px!important; text-align:left } h6 { font-size:16px!important; text-align:left } .es-header-body h1 a, .es-content-body h1 a, .es-footer-body h1 a { font-size:36px!important } .es-header-body h2 a, .es-content-body h2 a, .es-footer-body h2 a { font-size:26px!important } .es-header-body h3 a, .es-content-body h3 a, .es-footer-body h3 a { font-size:20px!important } .es-header-body h4 a, .es-content-body h4 a, .es-footer-body h4 a { font-size:24px!important } .es-header-body h5 a, .es-content-body h5 a, .es-footer-body h5 a { font-size:20px!important } .es-header-body h6 a, .es-content-body h6 a, .es-footer-body h6 a { font-size:16px!important } .es-menu td a { font-size:12px!important } .es-header-body p, .es-header-body a { font-size:14px!important } .es-content-body p, .es-content-body a { font-size:16px!important } .es-footer-body p, .es-footer-body a { font-size:14px!important } .es-infoblock p, .es-infoblock a { font-size:12px!important } .es-m-txt-c, .es-m-txt-c h1, .es-m-txt-c h2, .es-m-txt-c h3, .es-m-txt-c h4, .es-m-txt-c h5, .es-m-txt-c h6 { text-align:center!important } .es-m-txt-r, .es-m-txt-r h1, .es-m-txt-r h2, .es-m-txt-r h3, .es-m-txt-r h4, .es-m-txt-r h5, .es-m-txt-r h6 { text-align:right!important } .es-m-txt-j, .es-m-txt-j h1, .es-m-txt-j h2, .es-m-txt-j h3, .es-m-txt-j h4, .es-m-txt-j h5, .es-m-txt-j h6 { text-align:justify!important } .es-m-txt-l, .es-m-txt-l h1, .es-m-txt-l h2, .es-m-txt-l h3, .es-m-txt-l h4, .es-m-txt-l h5, .es-m-txt-l h6 { text-align:left!important } .es-m-txt-r img, .es-m-txt-c img, .es-m-txt-l img { display:inline!important } .es-m-txt-r .rollover:hover .rollover-second, .es-m-txt-c .rollover:hover .rollover-second, .es-m-txt-l .rollover:hover .rollover-second { display:inline!important } .es-m-txt-r .rollover div, .es-m-txt-c .rollover div, .es-m-txt-l .rollover div { line-height:0!important; font-size:0!important } .es-spacer { display:inline-table } a.es-button, button.es-button { font-size:20px!important } a.es-button, button.es-button { display:inline-block!important } .es-button-border { display:inline-block!important } .es-m-fw, .es-m-fw.es-fw, .es-m-fw .es-button { display:block!important } .es-m-il, .es-m-il .es-button, .es-social, .es-social td, .es-menu { display:inline-block!important } .es-adaptive table, .es-left, .es-right { width:100%!important } .es-content table, .es-header table, .es-footer table, .es-content, .es-footer, .es-header { width:100%!important; max-width:600px!important } .adapt-img { width:100%!important; height:auto!important } .es-mobile-hidden, .es-hidden { display:none!important } .es-desk-hidden { width:auto!important; overflow:visible!important; float:none!important; max-height:inherit!important; line-height:inherit!important } tr.es-desk-hidden { display:table-row!important } table.es-desk-hidden { display:table!important } td.es-desk-menu-hidden { display:table-cell!important } .es-menu td { width:1%!important } table.es-table-not-adapt, .esd-block-html table { width:auto!important } .es-social td { padding-bottom:10px } .h-auto { height:auto!important } a.es-button.es-button-6874 { font-size:14px!important } .img-3148 { height:36px!important } .es-text-2975, .es-text-2975 p, .es-text-2975 a, .es-text-2975 h1, .es-text-2975 h2, .es-text-2975 h3, .es-text-2975 h4, .es-text-2975 h5, .es-text-2975 h6, .es-text-2975 ul, .es-text-2975 ol { font-size:14px!important } .es-text-4842, .es-text-4842 p, .es-text-4842 a, .es-text-4842 h1, .es-text-4842 h2, .es-text-4842 h3, .es-text-4842 h4, .es-text-4842 h5, .es-text-4842 h6, .es-text-4842 ul, .es-text-4842 ol { font-size:14px!important } .es-text-3519, .es-text-3519 p, .es-text-3519 a, .es-text-3519 h1, .es-text-3519 h2, .es-text-3519 h3, .es-text-3519 h4, .es-text-3519 h5, .es-text-3519 h6, .es-text-3519 ul, .es-text-3519 ol { font-size:14px!important } .es-text-5889, .es-text-5889 p, .es-text-5889 a, .es-text-5889 h1, .es-text-5889 h2, .es-text-5889 h3, .es-text-5889 h4, .es-text-5889 h5, .es-text-5889 h6, .es-text-5889 ul, .es-text-5889 ol { font-size:14px!important } .es-text-8833, .es-text-8833 p, .es-text-8833 a, .es-text-8833 h1, .es-text-8833 h2, .es-text-8833 h3, .es-text-8833 h4, .es-text-8833 h5, .es-text-8833 h6, .es-text-8833 ul, .es-text-8833 ol { font-size:14px!important } }
</style>
 </head>
 <body style="width:100%;height:100%;padding:0;Margin:0">
  <div class="es-wrapper-color" style="background-color:#FAFAFA"><!--[if gte mso 9]>
			<v:background xmlns:v="urn:schemas-microsoft-com:vml" fill="t">
				<v:fill type="tile" color="#fafafa"></v:fill>
			</v:background>
		<![endif]-->
   <table class="es-wrapper" width="100%" cellspacing="0" cellpadding="0" style="mso-table-lspace:0pt;mso-table-rspace:0pt;border-collapse:collapse;border-spacing:0px;padding:0;Margin:0;width:100%;height:100%;background-repeat:repeat;background-position:center top;background-color:#f5f5f5">
     <tr>
      <td valign="top" style="padding:0;Margin:0">
       <table cellpadding="0" cellspacing="0" class="es-header" align="center" style="mso-table-lspace:0pt;mso-table-rspace:0pt;border-collapse:collapse;border-spacing:0px;width:100%;table-layout:fixed !important;background-color:transparent;background-repeat:repeat;background-position:center top">
         <tr>
          <td align="center" style="padding:0;Margin:0">
           <table bgcolor="#ffffff" class="es-header-body" align="center" cellpadding="0" cellspacing="0" style="mso-table-lspace:0pt;mso-table-rspace:0pt;border-collapse:collapse;border-spacing:0px;background-color:transparent;width:600px">
             <tr>
              <td align="left" style="Margin:0;padding-top:10px;padding-right:20px;padding-bottom:10px;padding-left:20px">
               <table cellpadding="0" cellspacing="0" width="100%" style="mso-table-lspace:0pt;mso-table-rspace:0pt;border-collapse:collapse;border-spacing:0px">
                 <tr>
                  <td class="es-m-p0r" valign="top" align="center" style="padding:0;Margin:0;width:560px">
                   <table cellpadding="0" cellspacing="0" width="100%" style="mso-table-lspace:0pt;mso-table-rspace:0pt;border-collapse:collapse;border-spacing:0px">
                     <tr>
                      <td align="left" style="padding:10px;Margin:0;font-size:0"><img class="img-3148" src="@eventimage" alt="" height="36" style="display:block;font-size:14px;border:0;outline:none;text-decoration:none"></td>
                     </tr>
                   </table></td>
                 </tr>
               </table></td>
             </tr>
           </table></td>
         </tr>
       </table>
       <table cellpadding="0" cellspacing="0" class="es-content" align="center" style="mso-table-lspace:0pt;mso-table-rspace:0pt;border-collapse:collapse;border-spacing:0px;width:100%;table-layout:fixed !important">
         <tr>
          <td align="center" style="padding:0;Margin:0">
           <table bgcolor="transparent" class="es-content-body" align="center" cellpadding="0" cellspacing="0" style="mso-table-lspace:0pt;mso-table-rspace:0pt;border-collapse:separate;border-spacing:0px;background-color:transparent;width:600px;border-width:0">
             <tr>
              <td align="left" style="Margin:0;padding-right:20px;padding-left:20px;padding-top:30px;padding-bottom:30px;border-radius:32px;background-color:#ffffff" bgcolor="#ffffff">
               <table cellpadding="0" cellspacing="0" width="100%" style="mso-table-lspace:0pt;mso-table-rspace:0pt;border-collapse:collapse;border-spacing:0px">
                 <tr>
                  <td align="center" valign="top" style="padding:0;Margin:0;width:560px">
                   <table cellpadding="0" cellspacing="0" width="100%" style="mso-table-lspace:0pt;mso-table-rspace:0pt;border-collapse:collapse;border-spacing:0px">
				     <tr @displayeventoldname>
                      <td align="left" class="es-text-2975 es-m-p10l es-m-p10r" style="padding:0;Margin:0;padding-right:20px;padding-left:20px;font-size:28px !important"><p style="Margin:0;mso-line-height-rule:exactly;font-family:arial, ''helvetica neue'', helvetica, sans-serif;line-height:42px;letter-spacing:0;color:#cccccc;font-size:28px !important"><strong><s>@eventoldname</s></strong></p></td>
                     </tr>
                     <tr>
                      <td align="left" class="es-text-2975 es-m-p10l es-m-p10r" style="padding:0;Margin:0;padding-right:20px;padding-left:20px;font-size:28px !important"><p style="Margin:0;mso-line-height-rule:exactly;font-family:arial, ''helvetica neue'', helvetica, sans-serif;line-height:42px;letter-spacing:0;color:#333333;font-size:28px !important"><strong>@eventname</strong></p></td>
                     </tr>
					 <tr @displayeventolddate>
                      <td align="left" class="es-text-4842 es-m-p10l es-m-p10r" style="Margin:0;padding-right:20px;padding-left:20px;padding-top:5px;padding-bottom:0px"><p style="Margin:0;mso-line-height-rule:exactly;font-family:arial, ''helvetica neue'', helvetica, sans-serif;line-height:21px;letter-spacing:0;color:#cccccc;font-size:14px"><s>@eventolddate</s></p></td>
                     </tr>
                     <tr>
                      <td align="left" class="es-text-4842 es-m-p10l es-m-p10r" style="Margin:0;padding-right:20px;padding-left:20px;padding-top:5px;padding-bottom:25px"><p style="Margin:0;mso-line-height-rule:exactly;font-family:arial, ''helvetica neue'', helvetica, sans-serif;line-height:21px;letter-spacing:0;color:#333333;font-size:14px">@eventdate</p></td>
                     </tr>
                     <tr @displayheadeventdescription>
                      <td align="left" class="es-m-p10l es-m-p10r" style="Margin:0;padding-right:20px;padding-left:20px;padding-top:5px;padding-bottom:5px"><p style="Margin:0;mso-line-height-rule:exactly;font-family:arial, ''helvetica neue'', helvetica, sans-serif;line-height:21px;letter-spacing:0;color:#333333;font-size:14px"><strong>Описание</strong></p></td>
                     </tr>
					 <tr @displayeventolddescription>
                      <td align="left" class="es-text-3519 es-m-p10l es-m-p10r" style="padding:0;Margin:0;padding-right:20px;padding-left:20px;padding-bottom:0px;color:#cccccc"><p style="Margin:0;mso-line-height-rule:exactly;font-family:arial, ''helvetica neue'', helvetica, sans-serif;line-height:21px;letter-spacing:0;font-size:14px"><s>@eventolddescription</s></p></td>
                     </tr>
                     <tr @displayeventdescription>
                      <td align="left" class="es-text-3519 es-m-p10l es-m-p10r" style="padding:0;Margin:0;padding-right:20px;padding-left:20px;padding-bottom:25px"><p style="Margin:0;mso-line-height-rule:exactly;font-family:arial, ''helvetica neue'', helvetica, sans-serif;line-height:21px;letter-spacing:0;color:#333333;font-size:14px">@eventdescription</p></td>
                     </tr>
                     <tr @displayheadeventplace>
                      <td align="left" class="es-m-p10l es-m-p10r" style="Margin:0;padding-right:20px;padding-left:20px;padding-top:5px;padding-bottom:5px"><p style="Margin:0;mso-line-height-rule:exactly;font-family:arial, ''helvetica neue'', helvetica, sans-serif;line-height:21px;letter-spacing:0;color:#333333;font-size:14px"><strong>Местоположение</strong></p></td>
                     </tr>
					 <tr @displayeventoldplace>
                      <td align="left" class="es-text-5889 es-m-p10l es-m-p10r" style="padding:0;Margin:0;padding-right:20px;padding-left:20px;padding-bottom:0px"><p style="Margin:0;mso-line-height-rule:exactly;font-family:arial, ''helvetica neue'', helvetica, sans-serif;line-height:21px;letter-spacing:0;color:#cccccc;font-size:14px"><s>@eventoldplace</s></p></td>
                     </tr>
                     <tr @displayeventplace>
                      <td align="left" class="es-text-5889 es-m-p10l es-m-p10r" style="padding:0;Margin:0;padding-right:20px;padding-left:20px;padding-bottom:25px"><p style="Margin:0;mso-line-height-rule:exactly;font-family:arial, ''helvetica neue'', helvetica, sans-serif;line-height:21px;letter-spacing:0;color:#333333;font-size:14px">@eventplace</p></td>
                     </tr>
                     <tr>
                      <td align="left" class="es-m-p10l es-m-p10r" style="Margin:0;padding-right:20px;padding-left:20px;padding-top:5px;padding-bottom:5px"><p style="Margin:0;mso-line-height-rule:exactly;font-family:arial, ''helvetica neue'', helvetica, sans-serif;line-height:21px;letter-spacing:0;color:#333333;font-size:14px"><strong>Гости</strong></p></td>
                     </tr>
                     <tr>
                      <td align="left" class="es-text-8833 es-m-p10l es-m-p10r" style="padding:0;Margin:0;padding-right:20px;padding-left:20px;padding-bottom:20px"><p style="Margin:0;mso-line-height-rule:exactly;font-family:arial, ''helvetica neue'', helvetica, sans-serif;line-height:21px;letter-spacing:0;color:#333333;font-size:14px">@owneremail -&nbsp;<span style="color:#999999">организатор</span>&nbsp;</p><p style="Margin:0;mso-line-height-rule:exactly;font-family:arial, ''helvetica neue'', helvetica, sans-serif;line-height:21px;letter-spacing:0;color:#333333;font-size:14px">@participantsemails</p></td>
                     </tr>
                     <tr>
                      <td align="left" class="es-m-p15t es-m-p15b es-m-txt-c es-m-p0l" style="padding:0;Margin:0;padding-left:20px;padding-bottom:20px;padding-top:20px"><span class="es-button-border" style="border-style:solid;border-color:#2CB543;background:#339AF0;border-width:0px;display:inline-block;border-radius:6px;width:auto"><a href="@eventview" class="es-button es-button-6874" target="_blank" style="mso-style-priority:100 !important;text-decoration:none !important;mso-line-height-rule:exactly;color:#FFFFFF;font-size:14px;padding:15px 40px;display:inline-block;background:#339AF0;border-radius:6px;font-family:arial, ''helvetica neue'', helvetica, sans-serif;font-weight:bold;font-style:normal;line-height:17px !important;width:auto;text-align:center;letter-spacing:0;mso-padding-alt:0;mso-border-alt:10px solid #339AF0;border-left-width:30px;border-right-width:30px">Посмотреть событие</a></span></td>
                     </tr>
                   </table></td>
                 </tr>
               </table></td>
             </tr>
           </table></td>
         </tr>
       </table>
       <table cellpadding="0" cellspacing="0" class="es-header" align="center" style="mso-table-lspace:0pt;mso-table-rspace:0pt;border-collapse:collapse;border-spacing:0px;width:100%;table-layout:fixed !important;background-color:transparent;background-repeat:repeat;background-position:center top">
         <tr>
          <td align="center" style="padding:0;Margin:0">
           <table bgcolor="#ffffff" class="es-header-body" align="center" cellpadding="0" cellspacing="0" style="mso-table-lspace:0pt;mso-table-rspace:0pt;border-collapse:collapse;border-spacing:0px;background-color:transparent;width:600px">
             <tr>
              <td align="left" style="Margin:0;padding-top:10px;padding-right:20px;padding-bottom:10px;padding-left:20px">
               <table cellpadding="0" cellspacing="0" width="100%" style="mso-table-lspace:0pt;mso-table-rspace:0pt;border-collapse:collapse;border-spacing:0px">
                 <tr>
                  <td class="es-m-p0r" valign="top" align="center" style="padding:0;Margin:0;width:560px">
                   <table cellpadding="0" cellspacing="0" width="100%" style="mso-table-lspace:0pt;mso-table-rspace:0pt;border-collapse:collapse;border-spacing:0px">
                     <tr>
                      <td align="left" style="padding:10px;Margin:0;font-size:0"><img class="img-3148" src="" alt="" height="36" style="display:block;font-size:14px;border:0;outline:none;text-decoration:none"></td>
                     </tr>
                   </table></td>
                 </tr>
               </table></td>
             </tr>
           </table></td>
         </tr>
       </table>	   </td>
     </tr>
   </table>
  </div>
 </body>
</html>','')
ON CONFLICT ("Key","Lang") DO UPDATE SET "Value"= EXCLUDED."Value";

--Шаблон сброса пароля
INSERT INTO public."MessageSettings"("Key",  "Value", "Lang") VALUES('ResetPassword.Html|Subject' ,N'Восстановление пароля','')
ON CONFLICT ("Key","Lang") DO UPDATE SET "Value"= EXCLUDED."Value";

INSERT INTO public."MessageSettings"("Key",  "Value", "Lang") VALUES('ResetPassword.Html|BodyHtml' ,N'<html><head></head>
<body style="padding:0;Margin:0">
	<table cellpadding="0" cellspacing="0" border="0" width="100%">
		<tbody>
			<tr>
				<td align="center" bgcolor="#F8F8F8" width="100%">
					<table cellpadding="0" cellspacing="0" width="100%" border="0">
						<tbody>
							<tr>
								<td align="center">
									<table align="center" cellpadding="0" cellspacing="0" border="0" style="max-width:900px; min-width:320px; width:90%">
										<tbody>
											<tr>
												<td align="left">
													<table align="center" cellpadding="0" cellspacing="0" border="0" width="90%">
														<tbody>
															<tr>
																<td align="left">
																	<table cellpadding="0" cellspacing="0" border="0" width="100%">
																		<tbody>
																			<tr>
																				<td height="20"></td>
																			</tr>
																		</tbody>
																	</table><img src="@eventimage" border="0" style="display:block; max-width:250px; max-height: 35px; ">
																	<table cellpadding="0" cellspacing="0" border="0" width="100%">
																		<tbody>
																			<tr>
																				<td height="20"></td>
																			</tr>
																		</tbody>
																	</table>
																</td>
															</tr>
														</tbody>
													</table>
												</td>
											</tr>
											<tr>
												<td align="left" bgcolor="#FFFFFF" style="border-radius:24px">
													<table align="center" cellpadding="0" cellspacing="0" border="0" width="90%">
														<tbody id="container">
															<tr>
																<td align="left">
																	<table cellpadding="0" cellspacing="0" border="0" width="100%">
																		<tbody>
																			<tr>
																				<td height="30"></td>
																			</tr>
																		</tbody>
																	</table>
																	<div style="font-family:-apple-system,''Segoe UI'',''Helvetica Neue'',Helvetica,Roboto,Arial,sans-serif; font-size:22px; line-height:30px; color:#333333">
																		<strong>Восстановление пароля</strong>
																	</div>
																	<table cellpadding="0" cellspacing="0" border="0" width="100%">
																		<tbody>
																			<tr>
																				<td height="10"></td>
																			</tr>
																		</tbody>
																	</table>
																	<div style="font-family:-apple-system,''Segoe UI'',''Helvetica Neue'',Helvetica,Roboto,Arial,sans-serif; font-size:16px; line-height:30px; color:#333333">
																		Нажмите на кнопку ниже, чтобы восстановить пароль.
																	</div>
																	<table cellpadding="0" cellspacing="0" border="0" width="100%">
																		<tbody>
																			<tr>
																				<td height="30"></td>
																			</tr>
																		</tbody>
																	</table>
																	<table cellpadding="0" cellspacing="0" border="0" width="200" style="width:200px">
																		<tbody>
																			<tr>
																				<td align="center" valign="middle" height="45" style="background-color:#175cd3;border-radius:7px;height:45px" bgcolor="#175CD3"><a href="@passwordUrl" style="display:block;width:100%;font-family:-apple-system,''Segoe UI'',''Helvetica Neue'',Helvetica,Roboto,Arial,sans-serif; color:#ffffff; font-size:16px; line-height:45px; text-decoration:none; white-space:nowrap; margin:0!important; padding:0;">Восстановить пароль</a>
																				</td>
																			</tr>
																		</tbody>
																	</table>
																	<table cellpadding="0" cellspacing="0" border="0" width="100%">
																		<tbody>
																			<tr>
																				<td height="30"></td>
																			</tr>
																		</tbody>
																	</table>
																</td>
															</tr>
															
														</tbody>
													</table>
												</td>
											</tr>
										</tbody>
									</table>
									<table cellpadding="0" cellspacing="0" border="0" width="100%">
										<tbody>
											<tr>
												<td height="40"></td>
											</tr>
										</tbody>
									</table>
								</td>
							</tr>
						</tbody>
					</table>
				</td>
			</tr>
		</tbody>
	</table>
</body></html>','')
ON CONFLICT ("Key","Lang") DO UPDATE SET "Value"= EXCLUDED."Value";

INSERT INTO public."MessageSettings"("Key",  "Value", "Lang") VALUES('ResetPassword.Html|Subject' ,N'Recover the password','en')
ON CONFLICT ("Key","Lang") DO UPDATE SET "Value"= EXCLUDED."Value";

INSERT INTO public."MessageSettings"("Key",  "Value", "Lang") VALUES('ResetPassword.Html|BodyHtml' ,N'<html><head></head>
<body style="padding:0;Margin:0">
	<table cellpadding="0" cellspacing="0" border="0" width="100%">
		<tbody>
			<tr>
				<td align="center" bgcolor="#F8F8F8" width="100%">
					<table cellpadding="0" cellspacing="0" width="100%" border="0">
						<tbody>
							<tr>
								<td align="center">
									<table align="center" cellpadding="0" cellspacing="0" border="0" style="max-width:900px; min-width:320px; width:90%">
										<tbody>
											<tr>
												<td align="left">
													<table align="center" cellpadding="0" cellspacing="0" border="0" width="90%">
														<tbody>
															<tr>
																<td align="left">
																	<table cellpadding="0" cellspacing="0" border="0" width="100%">
																		<tbody>
																			<tr>
																				<td height="20"></td>
																			</tr>
																		</tbody>
																	</table><img src="@eventimage" border="0" style="display:block; max-width:250px; max-height: 35px; ">
																	<table cellpadding="0" cellspacing="0" border="0" width="100%">
																		<tbody>
																			<tr>
																				<td height="20"></td>
																			</tr>
																		</tbody>
																	</table>
																</td>
															</tr>
														</tbody>
													</table>
												</td>
											</tr>
											<tr>
												<td align="left" bgcolor="#FFFFFF" style="border-radius:24px">
													<table align="center" cellpadding="0" cellspacing="0" border="0" width="90%">
														<tbody id="container">
															<tr>
																<td align="left">
																	<table cellpadding="0" cellspacing="0" border="0" width="100%">
																		<tbody>
																			<tr>
																				<td height="30"></td>
																			</tr>
																		</tbody>
																	</table>
																	<div style="font-family:-apple-system,''Segoe UI'',''Helvetica Neue'',Helvetica,Roboto,Arial,sans-serif; font-size:22px; line-height:30px; color:#333333">
																		<strong>Recover the password</strong>
																	</div>
																	<table cellpadding="0" cellspacing="0" border="0" width="100%">
																		<tbody>
																			<tr>
																				<td height="10"></td>
																			</tr>
																		</tbody>
																	</table>
																	<div style="font-family:-apple-system,''Segoe UI'',''Helvetica Neue'',Helvetica,Roboto,Arial,sans-serif; font-size:16px; line-height:30px; color:#333333">
																		Click on the button below to recover the password.
																	</div>
																	<table cellpadding="0" cellspacing="0" border="0" width="100%">
																		<tbody>
																			<tr>
																				<td height="30"></td>
																			</tr>
																		</tbody>
																	</table>
																	<table cellpadding="0" cellspacing="0" border="0" width="200" style="width:200px">
																		<tbody>
																			<tr>
																				<td align="center" valign="middle" height="45" style="background-color:#175cd3;border-radius:7px;height:45px" bgcolor="#175CD3"><a href="@passwordUrl" style="display:block;width:100%;font-family:-apple-system,''Segoe UI'',''Helvetica Neue'',Helvetica,Roboto,Arial,sans-serif; color:#ffffff; font-size:16px; line-height:45px; text-decoration:none; white-space:nowrap; margin:0!important; padding:0;">Recover the password</a>
																				</td>
																			</tr>
																		</tbody>
																	</table>
																	<table cellpadding="0" cellspacing="0" border="0" width="100%">
																		<tbody>
																			<tr>
																				<td height="30"></td>
																			</tr>
																		</tbody>
																	</table>
																</td>
															</tr>
															
														</tbody>
													</table>
												</td>
											</tr>
										</tbody>
									</table>
									<table cellpadding="0" cellspacing="0" border="0" width="100%">
										<tbody>
											<tr>
												<td height="40"></td>
											</tr>
										</tbody>
									</table>
								</td>
							</tr>
						</tbody>
					</table>
				</td>
			</tr>
		</tbody>
	</table>
</body></html>','en')
ON CONFLICT ("Key","Lang") DO UPDATE SET "Value"= EXCLUDED."Value";

--Шаблон подтверждения почты
INSERT INTO public."MessageSettings"("Key",  "Value", "Lang") VALUES('EmailConfirm.Html|Subject' ,N'Подтверждение почты','')
ON CONFLICT ("Key","Lang") DO UPDATE SET "Value"= EXCLUDED."Value";

INSERT INTO public."MessageSettings"("Key",  "Value", "Lang") VALUES('EmailConfirm.Html|BodyHtml' ,N'<html><head></head>
<body style="padding:0;Margin:0">
	<table cellpadding="0" cellspacing="0" border="0" width="100%">
		<tbody>
			<tr>
				<td align="center" bgcolor="#F8F8F8" width="100%">
					<table cellpadding="0" cellspacing="0" width="100%" border="0">
						<tbody>
							<tr>
								<td align="center">
									<table align="center" cellpadding="0" cellspacing="0" border="0" style="max-width:900px; min-width:320px; width:90%">
										<tbody>
											<tr>
												<td align="left">
													<table align="center" cellpadding="0" cellspacing="0" border="0" width="90%">
														<tbody>
															<tr>
																<td align="left">
																	<table cellpadding="0" cellspacing="0" border="0" width="100%">
																		<tbody>
																			<tr>
																				<td height="20"></td>
																			</tr>
																		</tbody>
																	</table><img src="@eventimage" border="0" style="display:block; max-width:250px; max-height: 35px; ">
																	<table cellpadding="0" cellspacing="0" border="0" width="100%">
																		<tbody>
																			<tr>
																				<td height="20"></td>
																			</tr>
																		</tbody>
																	</table>
																</td>
															</tr>
														</tbody>
													</table>
												</td>
											</tr>
											<tr>
												<td align="left" bgcolor="#FFFFFF" style="border-radius:24px">
													<table align="center" cellpadding="0" cellspacing="0" border="0" width="90%">
														<tbody id="container">
															<tr>
																<td align="left">
																	<table cellpadding="0" cellspacing="0" border="0" width="100%">
																		<tbody>
																			<tr>
																				<td height="30"></td>
																			</tr>
																		</tbody>
																	</table>
																	<div style="font-family:-apple-system,''Segoe UI'',''Helvetica Neue'',Helvetica,Roboto,Arial,sans-serif; font-size:22px; line-height:30px; color:#333333">
																		<strong>Подтверждение почты</strong>
																	</div>
																	<table cellpadding="0" cellspacing="0" border="0" width="100%">
																		<tbody>
																			<tr>
																				<td height="10"></td>
																			</tr>
																		</tbody>
																	</table>
																	<div style="font-family:-apple-system,''Segoe UI'',''Helvetica Neue'',Helvetica,Roboto,Arial,sans-serif; font-size:22px; line-height:30px; color:#333333">
																		Нажмите на кнопку ниже, чтобы подтвердить адрес электронной почты.
																	</div>
																	<table cellpadding="0" cellspacing="0" border="0" width="100%">
																		<tbody>
																			<tr>
																				<td height="30"></td>
																			</tr>
																		</tbody>
																	</table>
																	<table cellpadding="0" cellspacing="0" border="0" width="200" style="width:200px">
																		<tbody>
																			<tr>
																				<td align="center" valign="middle" height="45" style="background-color:#175cd3;border-radius:7px;height:45px" bgcolor="#175CD3"><a href="@confirmUrl" style="display:block;width:100%;font-family:-apple-system,''Segoe UI'',''Helvetica Neue'',Helvetica,Roboto,Arial,sans-serif; color:#ffffff; font-size:16px; line-height:45px; text-decoration:none; white-space:nowrap; margin:0!important; padding:0;">Подтвердить</a>
																				</td>
																			</tr>
																		</tbody>
																	</table>
																	<table cellpadding="0" cellspacing="0" border="0" width="100%">
																		<tbody>
																			<tr>
																				<td height="30"></td>
																			</tr>
																		</tbody>
																	</table>

																</td>
															</tr>
														</tbody>
													</table>
												</td>
											</tr>
										</tbody>
									</table>
									<table cellpadding="0" cellspacing="0" border="0" width="100%">
										<tbody>
											<tr>
												<td height="40"></td>
											</tr>
										</tbody>
									</table>
								</td>
							</tr>
						</tbody>
					</table>
				</td>
			</tr>
		</tbody>
	</table>
</body></html>','')
ON CONFLICT ("Key","Lang") DO UPDATE SET "Value"= EXCLUDED."Value";

INSERT INTO public."MessageSettings"("Key",  "Value", "Lang") VALUES('EmailConfirm.Html|Subject' ,N'Email confirmation','en')
ON CONFLICT ("Key","Lang") DO UPDATE SET "Value"= EXCLUDED."Value";

INSERT INTO public."MessageSettings"("Key",  "Value", "Lang") VALUES('EmailConfirm.Html|BodyHtml' ,N'<html><head></head>
<body style="padding:0;Margin:0">
	<table cellpadding="0" cellspacing="0" border="0" width="100%">
		<tbody>
			<tr>
				<td align="center" bgcolor="#F8F8F8" width="100%">
					<table cellpadding="0" cellspacing="0" width="100%" border="0">
						<tbody>
							<tr>
								<td align="center">
									<table align="center" cellpadding="0" cellspacing="0" border="0" style="max-width:900px; min-width:320px; width:90%">
										<tbody>
											<tr>
												<td align="left">
													<table align="center" cellpadding="0" cellspacing="0" border="0" width="90%">
														<tbody>
															<tr>
																<td align="left">
																	<table cellpadding="0" cellspacing="0" border="0" width="100%">
																		<tbody>
																			<tr>
																				<td height="20"></td>
																			</tr>
																		</tbody>
																	</table><img src="@eventimage" border="0" style="display:block; max-width:250px; max-height: 35px; ">
																	<table cellpadding="0" cellspacing="0" border="0" width="100%">
																		<tbody>
																			<tr>
																				<td height="20"></td>
																			</tr>
																		</tbody>
																	</table>
																</td>
															</tr>
														</tbody>
													</table>
												</td>
											</tr>
											<tr>
												<td align="left" bgcolor="#FFFFFF" style="border-radius:24px">
													<table align="center" cellpadding="0" cellspacing="0" border="0" width="90%">
														<tbody id="container">
															<tr>
																<td align="left">
																	<table cellpadding="0" cellspacing="0" border="0" width="100%">
																		<tbody>
																			<tr>
																				<td height="30"></td>
																			</tr>
																		</tbody>
																	</table>
																	<div style="font-family:-apple-system,''Segoe UI'',''Helvetica Neue'',Helvetica,Roboto,Arial,sans-serif; font-size:22px; line-height:30px; color:#333333">
																		<strong>Email confirmation</strong>
																	</div>
																	<table cellpadding="0" cellspacing="0" border="0" width="100%">
																		<tbody>
																			<tr>
																				<td height="10"></td>
																			</tr>
																		</tbody>
																	</table>
																	<div style="font-family:-apple-system,''Segoe UI'',''Helvetica Neue'',Helvetica,Roboto,Arial,sans-serif; font-size:22px; line-height:30px; color:#333333">
																		Click on the button below to confirm the email address..
																	</div>
																	<table cellpadding="0" cellspacing="0" border="0" width="100%">
																		<tbody>
																			<tr>
																				<td height="30"></td>
																			</tr>
																		</tbody>
																	</table>
																	<table cellpadding="0" cellspacing="0" border="0" width="200" style="width:200px">
																		<tbody>
																			<tr>
																				<td align="center" valign="middle" height="45" style="background-color:#175cd3;border-radius:7px;height:45px" bgcolor="#175CD3"><a href="@confirmUrl" style="display:block;width:100%;font-family:-apple-system,''Segoe UI'',''Helvetica Neue'',Helvetica,Roboto,Arial,sans-serif; color:#ffffff; font-size:16px; line-height:45px; text-decoration:none; white-space:nowrap; margin:0!important; padding:0;">Confirm</a>
																				</td>
																			</tr>
																		</tbody>
																	</table>
																	<table cellpadding="0" cellspacing="0" border="0" width="100%">
																		<tbody>
																			<tr>
																				<td height="30"></td>
																			</tr>
																		</tbody>
																	</table>

																</td>
															</tr>
														</tbody>
													</table>
												</td>
											</tr>
										</tbody>
									</table>
									<table cellpadding="0" cellspacing="0" border="0" width="100%">
										<tbody>
											<tr>
												<td height="40"></td>
											</tr>
										</tbody>
									</table>
								</td>
							</tr>
						</tbody>
					</table>
				</td>
			</tr>
		</tbody>
	</table>
</body></html>','en')
ON CONFLICT ("Key","Lang") DO UPDATE SET "Value"= EXCLUDED."Value";


INSERT INTO public."MessageSettings"("Key",  "Value", "Lang") VALUES ('Mail|ModuleUrlData','{"Icon":"/source/modules/icon-mail.svg", "Culture":{"ru":"Почта","en":"Mail" }}','')
ON CONFLICT ("Key","Lang") DO UPDATE SET "Value"= EXCLUDED."Value";

INSERT INTO public."MessageSettings"("Key",  "Value", "Lang") VALUES ('Admin|ModuleUrlData','{"Icon":"/source/modules/icon-admin.svg", "Culture":{"ru":"Управление","en":"Management" }}','')
ON CONFLICT ("Key","Lang") DO UPDATE SET "Value"= EXCLUDED."Value";

INSERT INTO public."MessageSettings"("Key",  "Value", "Lang") VALUES ('Calendar|ModuleUrlData','{"Icon":"/source/modules/icon-calendar.svg", "Culture":{"ru":"Календарь","en":"Calendar" }}','')
ON CONFLICT ("Key","Lang") DO UPDATE SET "Value"= EXCLUDED."Value";

INSERT INTO public."MessageSettings"("Key",  "Value", "Lang") VALUES ('Draw|ModuleUrlData','{"Icon":"/source/modules/icon-draw.svg", "Culture":{"ru":"Графика","en":"Draw" }}','')
ON CONFLICT ("Key","Lang") DO UPDATE SET "Value"= EXCLUDED."Value";

INSERT INTO public."MessageSettings"("Key",  "Value", "Lang") VALUES ('Payments|ModuleUrlData','{"Icon":"/source/modules/icon-payments.svg", "Culture":{"ru":"Платежи","en":"Payments" }}','')
ON CONFLICT ("Key","Lang") DO UPDATE SET "Value"= EXCLUDED."Value";

INSERT INTO public."MessageSettings"("Key",  "Value", "Lang") VALUES ('Contacts|ModuleUrlData','{"Icon":"/source/modules/icon-contacts.svg", "Culture":{"ru":"Контакты","en":"Contacts" }}','')
ON CONFLICT ("Key","Lang") DO UPDATE SET "Value"= EXCLUDED."Value";

INSERT INTO public."MessageSettings"("Key",  "Value", "Lang") VALUES ('Disk|ModuleUrlData','{"Icon":"/source/modules/icon-disk.svg", "Culture":{"ru":"Диск","en":"Disk" }}','')
ON CONFLICT ("Key","Lang") DO UPDATE SET "Value"= EXCLUDED."Value";

INSERT INTO public."MessageSettings"("Key",  "Value", "Lang") VALUES ('Team|ModuleUrlData','{"Icon":"/source/modules/icon-team.svg", "Culture":{"ru":"Команды","en":"Team" }}','')
ON CONFLICT ("Key","Lang") DO UPDATE SET "Value"= EXCLUDED."Value";

INSERT INTO public."MessageSettings"("Key",  "Value", "Lang") VALUES ('Projects|ModuleUrlData','{"Icon":"/source/modules/icon-projects.svg", "Culture":{"ru":"Проекты","en":"Projects" }}','')
ON CONFLICT ("Key","Lang") DO UPDATE SET "Value"= EXCLUDED."Value";

INSERT INTO public."MessageSettings"("Key",  "Value", "Lang") VALUES ('Pages|ModuleUrlData','{"Icon":"/source/modules/icon-pages.svg", "Culture":{"ru":"Страницы","en":"Pages" }}','')
ON CONFLICT ("Key","Lang") DO UPDATE SET "Value"= EXCLUDED."Value";

INSERT INTO public."MessageSettings"("Key",  "Value", "Lang") VALUES ('Forms|ModuleUrlData','{"Icon":"/source/modules/icon-forms.svg", "Culture":{"ru":"Формы","en":"Forms" }}','')
ON CONFLICT ("Key","Lang") DO UPDATE SET "Value"= EXCLUDED."Value";

END $$