You are here

mailgun--password-reset.html.twig in Mailgun 8

The default template file for e-mails.

Available variables:

  • subject: The subject.
  • body: The message content.
  • message: The $message array created and used in the mail building procedure. Its content varies between cases, but typically contains at least the following elements:

    • id: The message identifier.
    • module: The module that handles the building of the message.
    • key: The key of the message.
    • to: The recipient email address.
    • from: The email address of the sender.
    • langcode: The langcode to use to compose the e-mail.
    • params: The message parameters.

This template may be overriden by module and/or mail key, using any of the following template names:

  • mailgun.html.twig: global, used by default.
  • mailgun--mymodule.html.twig: only emails sent by the module "mymodule".
  • mailgun--mymodule--test.html.twig: only emails by the module "mymodule" with key "test".

File

modules/mailgun_email_templates_examples/templates/mailgun--password-reset.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * The default template file for e-mails.
  5. *
  6. * Available variables:
  7. * - subject: The subject.
  8. * - body: The message content.
  9. * - message: The $message array created and used in the mail building
  10. * procedure. Its content varies between cases, but typically contains at
  11. * least the following elements:
  12. * - id: The message identifier.
  13. * - module: The module that handles the building of the message.
  14. * - key: The key of the message.
  15. * - to: The recipient email address.
  16. * - from: The email address of the sender.
  17. * - langcode: The langcode to use to compose the e-mail.
  18. * - params: The message parameters.
  19. *
  20. * This template may be overriden by module and/or mail key, using any of the
  21. * following template names:
  22. * - mailgun.html.twig: global, used by default.
  23. * - mailgun--mymodule.html.twig: only emails sent by the module "mymodule".
  24. * - mailgun--mymodule--test.html.twig: only emails by the module
  25. * "mymodule" with key "test".
  26. *
  27. * @see template_preprocess()
  28. * @see template_preprocess_mailgun()
  29. *
  30. * @ingroup themeable
  31. */
  32. #}
  33. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  34. <html xmlns="http://www.w3.org/1999/xhtml" style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;">
  35. <head>
  36. <meta name="viewport" content="width=device-width" />
  37. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  38. <style type="text/css">
  39. img {
  40. max-width: 100%;
  41. }
  42. body {
  43. -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none; width: 100% !important; height: 100%; line-height: 1.6em;
  44. }
  45. body {
  46. background-color: #f6f6f6;
  47. }
  48. table table table tr td a {
  49. text-decoration: none;
  50. color: #fff !important;
  51. background-color: #348eda;
  52. border: 10px solid #348eda;
  53. font-weight: bold;
  54. text-align: center;
  55. display: inline-block;
  56. border-radius: 5px;
  57. margin: 15px 10px;
  58. }
  59. @media only screen and (max-width: 640px) {
  60. body {
  61. padding: 0 !important;
  62. }
  63. h1 {
  64. font-weight: 800 !important; margin: 20px 0 5px !important;
  65. }
  66. h2 {
  67. font-weight: 800 !important; margin: 20px 0 5px !important;
  68. }
  69. h3 {
  70. font-weight: 800 !important; margin: 20px 0 5px !important;
  71. }
  72. h4 {
  73. font-weight: 800 !important; margin: 20px 0 5px !important;
  74. }
  75. h1 {
  76. font-size: 22px !important;
  77. }
  78. h2 {
  79. font-size: 18px !important;
  80. }
  81. h3 {
  82. font-size: 16px !important;
  83. }
  84. .container {
  85. padding: 0 !important; width: 100% !important;
  86. }
  87. .content {
  88. padding: 0 !important;
  89. }
  90. .content-wrap {
  91. padding: 10px !important;
  92. }
  93. }
  94. </style>
  95. </head>
  96. <body itemscope itemtype="http://schema.org/EmailMessage" style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none; width: 100% !important; height: 100%; line-height: 1.6em; background-color: #f6f6f6; margin: 0;" bgcolor="#f6f6f6">
  97. <table class="body-wrap" style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; width: 100%; background-color: #f6f6f6; margin: 0;" bgcolor="#f6f6f6"><tr style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;">
  98. <td style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; vertical-align: top; margin: 0;" valign="top"></td>
  99. <td class="container" width="600" style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; vertical-align: top; display: block !important; max-width: 600px !important; clear: both !important; margin: 0 auto;" valign="top">
  100. <div class="content" style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; max-width: 600px; display: block; margin: 0 auto; padding: 20px;">
  101. <table class="main" width="100%" cellpadding="0" cellspacing="0" style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; border-radius: 3px; background-color: #fff; margin: 0; border: 1px solid #e9e9e9;" bgcolor="#fff">
  102. <tr style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;">
  103. <td class="alert alert-warning" style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 16px; vertical-align: top; color: #000000; font-weight: 500; text-align: center; border-radius: 3px 3px 0 0; background-color: #ffb300; margin: 0; padding: 20px;" align="center" bgcolor="#FF9F00" valign="top">
  104. <meta itemprop="name" content="Confirm Email"/>
  105. {{ 'Warning: A request to reset the password for your account!'|t }}
  106. </td>
  107. </tr>
  108. <tr style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;"><td class="content-wrap" style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; vertical-align: top; margin: 0; padding: 20px;" valign="top">
  109. <table width="100%" cellpadding="0" cellspacing="0" style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;">
  110. <tr style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;">
  111. <td class="content-block" style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; vertical-align: top; margin: 0; padding: 0 0 20px;" valign="top">
  112. {{ body }}
  113. </td>
  114. </tr>
  115. </table>
  116. </td>
  117. </tr>
  118. </table>
  119. <div class="footer" style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; width: 100%; clear: both; color: #999; margin: 0; padding: 20px;">
  120. <table width="100%" style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;">
  121. <tr style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;">
  122. <td class="aligncenter content-block" style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 12px; vertical-align: top; color: #999; text-align: center; margin: 0; padding: 0 0 20px;" align="center" valign="top">
  123. {{ 'Thanks for using'|t }} <a href="https://www.drupal.org/project/mailgun" style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 12px; color: #999; text-decoration: underline; margin: 0;">{{ 'Mailgun' }}</a>.
  124. </td>
  125. </tr>
  126. </table>
  127. </div>
  128. </div>
  129. </td>
  130. <td style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; vertical-align: top; margin: 0;" valign="top"></td>
  131. </tr></table></body>
  132. </html>