swiftmailer.html.twig 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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. * - is_html: True if generating HTML output, false for plain text.
  10. * - message: The $message array created and used in the mail building
  11. * procedure. Its content varies between cases, but typically contains at
  12. * least the following elements:
  13. * - id: The message identifier.
  14. * - module: The module that handles the building of the message.
  15. * - key: The key of the message.
  16. * - to: The recipient email address.
  17. * - from: The email address of the sender.
  18. * - langcode: The langcode to use to compose the e-mail.
  19. * - params: The message parameters.
  20. * - base_url: The site base url including scheme, without trailing slash.
  21. *
  22. * This template may be overriden by module and/or mail key, using any of the
  23. * following template names:
  24. * - swiftmailer.html.twig: global, used by default.
  25. * - swiftmailer--mymodule.html.twig: only emails sent by the module "mymodule".
  26. * - swiftmailer--mymodule--test.html.twig: only emails by the module
  27. * "mymodule" with key "test".
  28. *
  29. * @see template_preprocess()
  30. * @see template_preprocess_swiftmailer()
  31. *
  32. * @ingroup themeable
  33. */
  34. #}
  35. {% if is_html %}
  36. <html>
  37. <head>
  38. <style type="text/css">
  39. table tr td {
  40. font-family: Arial;
  41. font-size: 12px;
  42. }
  43. </style>
  44. </head>
  45. <body>
  46. {{ body }}
  47. </body>
  48. </html>
  49. {% else %}
  50. {{ body }}
  51. {% endif %}