{"id":45933,"date":"2017-02-14T15:48:28","date_gmt":"2017-02-14T10:18:28","guid":{"rendered":"https:\/\/tothenewco.pro\/blog\/?p=45933"},"modified":"2017-05-22T14:06:58","modified_gmt":"2017-05-22T08:36:58","slug":"how-to-send-html-emails-in-drupal-8","status":"publish","type":"post","link":"https:\/\/tothenewco.pro\/blog\/how-to-send-html-emails-in-drupal-8\/","title":{"rendered":"How to send HTML Emails in Drupal 8?"},"content":{"rendered":"<p>Thinking of how to setup emails in <a title=\"Drupal development\" href=\"https:\/\/tothenewco.pro\/wcm\/drupal-development-consulting-services\">Drupal 8<\/a> site? Are you searching\u00a0for different options? Did you get any success? If no, then this blog will be helpful.<\/p>\n<p>Gone are the days when a prospect used to get a simple one line email after submitting a\u00a0query\u00a0on the website or filling out a contact form. The world is changing rapidly and so is the communication mediums. Now every organization wants to acknowledge their visitors\/prospects when he\/she fills up a form on your website by sending out an\u00a0attractive HTMLised email which contains links and images.<\/p>\n<p>This blog will demonstrate how to send out HTML emails programmatically in Drupal 8.<\/p>\n<p>Header :<br \/>\nAll emails are preceded by header that identify routing information of that message.<br \/>\nHeader includes<\/p>\n<p>From: Sender&#8217;s name and email address (This is mandatory)<br \/>\nTo: Recipient&#8217;s name and email address (This is mandatory)<br \/>\nSubject: Subject heading<\/p>\n<p>Below we will explain how to send HTML email after successful Contact form is submitted similarly this can be used to setup and send emails when any a different type of form is submitted.<\/p>\n<p>Step 1: Define a function which will be called after your form is submitted (here we are taking example of contact form)<\/p>\n<p>[php]<br \/>\n\/**<br \/>\n* hook_form_alter()<br \/>\n*\/<\/p>\n<p>function mymodule_form_alter (&amp;amp;$form, \\Drupal\\Core\\Form\\FormStateInterface $form_state, $form_id){<br \/>\nif($form_id == &#8216;contact_message_personal_form&#8217;){<br \/>\n$form[&#8216;actions&#8217;][&#8216;submit&#8217;][&#8216;#submit&#8217;][] = &#8216;mymodule_html_mails&#8217;; \/\/custom name<br \/>\n}<br \/>\n}<\/p>\n<p>function mymodule_html_mails($form, \\Drupal\\Core\\Form\\FormStateInterface $form_state){<br \/>\n$send_mail = new \\Drupal\\Core\\Mail\\Plugin\\Mail\\PhpMail(); \/\/ this is used to send HTML emails<br \/>\n$from = \u2018from@gmail.com\u2019;<br \/>\n$to = \u2018to@gmail.com\u2019;<br \/>\n$message[&#8216;headers&#8217;] = array(<br \/>\n&#8216;content-type&#8217; =&gt; &#8216;text\/html&#8217;,<br \/>\n&#8216;MIME-Version&#8217; =&gt; &#8216;1.0&#8217;,<br \/>\n&#8216;reply-to&#8217; =&gt; $from,<br \/>\n&#8216;from&#8217; =&gt; &#8216;sender name &lt;&#8216;.$from.&#8217;&gt;&#8217;<br \/>\n);<br \/>\n$message[&#8216;to&#8217;] = $to;<br \/>\n$message[&#8216;subject&#8217;] = &quot;Subject Goes here !!!!!&quot;;<\/p>\n<p>$message[&#8216;body&#8217;] = &#8216;Hello,<br \/>\nThank you for reading this blog.&#8217;;<\/p>\n<p>$send_mail-&gt;mail($message);<br \/>\n}<\/p>\n<p>This will send HTML email to users. Now what if I have huge body content? Should I write whole body content in the above function? Is it good practice? No, not at all. We should ideally create template for the body content using hook_theme() function of Drupal. Below is the example:<\/p>\n<p>\/*<br \/>\n* hook_theme()<br \/>\n*\/<br \/>\nfunction hook_theme(){<br \/>\nreturn [<br \/>\n &#8216;mail-body&#8217; =&gt;<br \/>\n [<br \/>\n  &#8216;variables&#8217; =&gt; [<br \/>\n   &#8216;text 1&#8217; =&gt; NULL,<br \/>\n  ],<br \/>\n ]<br \/>\n];<br \/>\n}<br \/>\n[\/php]<\/p>\n<p>Now create a variable such as $theme_body, where we will define the theme which will be called.<\/p>\n<p>For Example :<\/p>\n<p>[php]<br \/>\n$theme_body = array(<br \/>\n&#8216;#theme&#8217; =&gt; &#8216;mail-body&#8217;,<br \/>\n&#8216;#text\u2019 =&gt; &#8216;Body of mail goes here\u2026\u2026..&#8217;,<br \/>\n);<br \/>\n[\/php]<\/p>\n<p>Here,<br \/>\n#theme : Is the name of theme template<br \/>\n#text : Is the variable which I want to use in my template, This #text can be anything it&#8217;s just a variable. We can define any number of variables.<\/p>\n<p>Now, message body will be something like<\/p>\n<p>[php]<br \/>\n$mail_body = drupal_render($theme_body);<br \/>\n$message[&#8216;body&#8217;] = $mail_body;<br \/>\n[\/php]<\/p>\n<p>Now, Create Mail Template with name : \u201cmail-body.html.twig\u201d under modules\/custom\/module_name\/templates\/mail-body.html.twig. And now here write your html body content.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Thinking of how to setup emails in Drupal 8 site? Are you searching\u00a0for different options? Did you get any success? If no, then this blog will be helpful. Gone are the days when a prospect used to get a simple one line email after submitting a\u00a0query\u00a0on the website or filling out a contact form. The [&hellip;]<\/p>\n","protected":false},"author":1053,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":56,"footnotes":""},"categories":[3602],"tags":[],"class_list":["post-45933","post","type-post","status-publish","format-standard","hentry","category-drupal"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.0.1 - aioseo.com -->\n\t<meta name=\"description\" content=\"Thinking of how to setup emails in Drupal 8 site? Are you searching for different options? Did you get any success? If no, then this blog will be helpful. Gone are the days when a prospect used to get a simple one line email after submitting a query on the website or filling out a contact form. The\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Chandni Chanana\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/tothenewco.pro\/blog\/how-to-send-html-emails-in-drupal-8\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.0.1\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"TO THE NEW BLOG\" \/>\n\t\t<meta property=\"og:type\" content=\"blog\" \/>\n\t\t<meta property=\"og:title\" content=\"How to send HTML Emails in Drupal 8? | TO THE NEW Blog\" \/>\n\t\t<meta property=\"og:description\" content=\"Thinking of how to setup emails in Drupal 8 site? Are you searching for different options? Did you get any success? If no, then this blog will be helpful. Gone are the days when a prospect used to get a simple one line email after submitting a query on the website or filling out a contact form. The\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/tothenewco.pro\/blog\/how-to-send-html-emails-in-drupal-8\/\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/tothenewco.pro\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/tothenewco.pro\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:site\" content=\"@tothenew\" \/>\n\t\t<meta name=\"twitter:title\" content=\"How to send HTML Emails in Drupal 8? | TO THE NEW Blog\" \/>\n\t\t<meta name=\"twitter:description\" content=\"Thinking of how to setup emails in Drupal 8 site? Are you searching for different options? Did you get any success? If no, then this blog will be helpful. Gone are the days when a prospect used to get a simple one line email after submitting a query on the website or filling out a contact form. The\" \/>\n\t\t<meta name=\"twitter:image\" content=\"https:\/\/tothenewco.pro\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/how-to-send-html-emails-in-drupal-8\\\/#article\",\"name\":\"How to send HTML Emails in Drupal 8? | TO THE NEW Blog\",\"headline\":\"How to send HTML Emails in Drupal 8?\",\"author\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/chandni-chanana\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\"},\"datePublished\":\"2017-02-14T15:48:28+05:30\",\"dateModified\":\"2017-05-22T14:06:58+05:30\",\"inLanguage\":\"en-US\",\"commentCount\":15,\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/how-to-send-html-emails-in-drupal-8\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/how-to-send-html-emails-in-drupal-8\\\/#webpage\"},\"articleSection\":\"Drupal\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/how-to-send-html-emails-in-drupal-8\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.tothenew.com\\\/blog\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/drupal\\\/#listItem\",\"name\":\"Drupal\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/drupal\\\/#listItem\",\"position\":2,\"name\":\"Drupal\",\"item\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/drupal\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/how-to-send-html-emails-in-drupal-8\\\/#listItem\",\"name\":\"How to send HTML Emails in Drupal 8?\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/how-to-send-html-emails-in-drupal-8\\\/#listItem\",\"position\":3,\"name\":\"How to send HTML Emails in Drupal 8?\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/drupal\\\/#listItem\",\"name\":\"Drupal\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\",\"name\":\"TO THE NEW Blog\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/chandni-chanana\\\/#author\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/chandni-chanana\\\/\",\"name\":\"Chandni Chanana\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/how-to-send-html-emails-in-drupal-8\\\/#authorImage\",\"url\":\"https:\\\/\\\/newersworld-sf-static.tothenew.net\\\/prod\\\/profilePicFolder\\\/07a58239-0eb8-4c33-a116-a591d874a36f_72-Chandni-Chanana-PROFILEPICTURE.jpeg\",\"width\":96,\"height\":96,\"caption\":\"Chandni Chanana\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/how-to-send-html-emails-in-drupal-8\\\/#webpage\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/how-to-send-html-emails-in-drupal-8\\\/\",\"name\":\"How to send HTML Emails in Drupal 8? | TO THE NEW Blog\",\"description\":\"Thinking of how to setup emails in Drupal 8 site? Are you searching for different options? Did you get any success? If no, then this blog will be helpful. Gone are the days when a prospect used to get a simple one line email after submitting a query on the website or filling out a contact form. The\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/how-to-send-html-emails-in-drupal-8\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/chandni-chanana\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/chandni-chanana\\\/#author\"},\"datePublished\":\"2017-02-14T15:48:28+05:30\",\"dateModified\":\"2017-05-22T14:06:58+05:30\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/\",\"name\":\"TO THE NEW Blog\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"How to send HTML Emails in Drupal 8? | TO THE NEW Blog","description":"Thinking of how to setup emails in Drupal 8 site? Are you searching for different options? Did you get any success? If no, then this blog will be helpful. Gone are the days when a prospect used to get a simple one line email after submitting a query on the website or filling out a contact form. The","canonical_url":"https:\/\/tothenewco.pro\/blog\/how-to-send-html-emails-in-drupal-8\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/tothenewco.pro\/blog\/how-to-send-html-emails-in-drupal-8\/#article","name":"How to send HTML Emails in Drupal 8? | TO THE NEW Blog","headline":"How to send HTML Emails in Drupal 8?","author":{"@id":"https:\/\/tothenewco.pro\/blog\/author\/chandni-chanana\/#author"},"publisher":{"@id":"https:\/\/tothenewco.pro\/blog\/#organization"},"datePublished":"2017-02-14T15:48:28+05:30","dateModified":"2017-05-22T14:06:58+05:30","inLanguage":"en-US","commentCount":15,"mainEntityOfPage":{"@id":"https:\/\/tothenewco.pro\/blog\/how-to-send-html-emails-in-drupal-8\/#webpage"},"isPartOf":{"@id":"https:\/\/tothenewco.pro\/blog\/how-to-send-html-emails-in-drupal-8\/#webpage"},"articleSection":"Drupal"},{"@type":"BreadcrumbList","@id":"https:\/\/tothenewco.pro\/blog\/how-to-send-html-emails-in-drupal-8\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/tothenewco.pro\/blog#listItem","position":1,"name":"Home","item":"https:\/\/tothenewco.pro\/blog","nextItem":{"@type":"ListItem","@id":"https:\/\/tothenewco.pro\/blog\/category\/drupal\/#listItem","name":"Drupal"}},{"@type":"ListItem","@id":"https:\/\/tothenewco.pro\/blog\/category\/drupal\/#listItem","position":2,"name":"Drupal","item":"https:\/\/tothenewco.pro\/blog\/category\/drupal\/","nextItem":{"@type":"ListItem","@id":"https:\/\/tothenewco.pro\/blog\/how-to-send-html-emails-in-drupal-8\/#listItem","name":"How to send HTML Emails in Drupal 8?"},"previousItem":{"@type":"ListItem","@id":"https:\/\/tothenewco.pro\/blog#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/tothenewco.pro\/blog\/how-to-send-html-emails-in-drupal-8\/#listItem","position":3,"name":"How to send HTML Emails in Drupal 8?","previousItem":{"@type":"ListItem","@id":"https:\/\/tothenewco.pro\/blog\/category\/drupal\/#listItem","name":"Drupal"}}]},{"@type":"Organization","@id":"https:\/\/tothenewco.pro\/blog\/#organization","name":"TO THE NEW Blog","url":"https:\/\/tothenewco.pro\/blog\/"},{"@type":"Person","@id":"https:\/\/tothenewco.pro\/blog\/author\/chandni-chanana\/#author","url":"https:\/\/tothenewco.pro\/blog\/author\/chandni-chanana\/","name":"Chandni Chanana","image":{"@type":"ImageObject","@id":"https:\/\/tothenewco.pro\/blog\/how-to-send-html-emails-in-drupal-8\/#authorImage","url":"https:\/\/newersworld-sf-static.tothenew.net\/prod\/profilePicFolder\/07a58239-0eb8-4c33-a116-a591d874a36f_72-Chandni-Chanana-PROFILEPICTURE.jpeg","width":96,"height":96,"caption":"Chandni Chanana"}},{"@type":"WebPage","@id":"https:\/\/tothenewco.pro\/blog\/how-to-send-html-emails-in-drupal-8\/#webpage","url":"https:\/\/tothenewco.pro\/blog\/how-to-send-html-emails-in-drupal-8\/","name":"How to send HTML Emails in Drupal 8? | TO THE NEW Blog","description":"Thinking of how to setup emails in Drupal 8 site? Are you searching for different options? Did you get any success? If no, then this blog will be helpful. Gone are the days when a prospect used to get a simple one line email after submitting a query on the website or filling out a contact form. The","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/tothenewco.pro\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/tothenewco.pro\/blog\/how-to-send-html-emails-in-drupal-8\/#breadcrumblist"},"author":{"@id":"https:\/\/tothenewco.pro\/blog\/author\/chandni-chanana\/#author"},"creator":{"@id":"https:\/\/tothenewco.pro\/blog\/author\/chandni-chanana\/#author"},"datePublished":"2017-02-14T15:48:28+05:30","dateModified":"2017-05-22T14:06:58+05:30"},{"@type":"WebSite","@id":"https:\/\/tothenewco.pro\/blog\/#website","url":"https:\/\/tothenewco.pro\/blog\/","name":"TO THE NEW Blog","inLanguage":"en-US","publisher":{"@id":"https:\/\/tothenewco.pro\/blog\/#organization"}}]},"og:locale":"en_US","og:site_name":"TO THE NEW BLOG","og:type":"blog","og:title":"How to send HTML Emails in Drupal 8? | TO THE NEW Blog","og:description":"Thinking of how to setup emails in Drupal 8 site? Are you searching for different options? Did you get any success? If no, then this blog will be helpful. Gone are the days when a prospect used to get a simple one line email after submitting a query on the website or filling out a contact form. The","og:url":"https:\/\/tothenewco.pro\/blog\/how-to-send-html-emails-in-drupal-8\/","og:image":"https:\/\/tothenewco.pro\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png","og:image:secure_url":"https:\/\/tothenewco.pro\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png","twitter:card":"summary","twitter:site":"@tothenew","twitter:title":"How to send HTML Emails in Drupal 8? | TO THE NEW Blog","twitter:description":"Thinking of how to setup emails in Drupal 8 site? Are you searching for different options? Did you get any success? If no, then this blog will be helpful. Gone are the days when a prospect used to get a simple one line email after submitting a query on the website or filling out a contact form. The","twitter:image":"https:\/\/tothenewco.pro\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png"},"aioseo_meta_data":{"post_id":"45933","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":"","og_description":"","og_object_type":"blog","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":"","og_custom_url":null,"og_article_section":"","og_article_tags":"","twitter_use_og":false,"twitter_card":"summary","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"Article","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"limit_modified_date":false,"created":"2021-04-29 12:55:44","updated":"2024-02-29 08:41:23","focus_keyword":null,"additional_keywords":null,"truseo_locale":null,"ai":null,"breadcrumb_settings":null,"seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/tothenewco.pro\/blog\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/tothenewco.pro\/blog\/category\/drupal\/\" title=\"Drupal\">Drupal<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tHow to send HTML Emails in Drupal 8?\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/tothenewco.pro\/blog"},{"label":"Drupal","link":"https:\/\/tothenewco.pro\/blog\/category\/drupal\/"},{"label":"How to send HTML Emails in Drupal 8?","link":"https:\/\/tothenewco.pro\/blog\/how-to-send-html-emails-in-drupal-8\/"}],"_links":{"self":[{"href":"https:\/\/tothenewco.pro\/blog\/wp-json\/wp\/v2\/posts\/45933","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tothenewco.pro\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tothenewco.pro\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tothenewco.pro\/blog\/wp-json\/wp\/v2\/users\/1053"}],"replies":[{"embeddable":true,"href":"https:\/\/tothenewco.pro\/blog\/wp-json\/wp\/v2\/comments?post=45933"}],"version-history":[{"count":0,"href":"https:\/\/tothenewco.pro\/blog\/wp-json\/wp\/v2\/posts\/45933\/revisions"}],"wp:attachment":[{"href":"https:\/\/tothenewco.pro\/blog\/wp-json\/wp\/v2\/media?parent=45933"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tothenewco.pro\/blog\/wp-json\/wp\/v2\/categories?post=45933"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tothenewco.pro\/blog\/wp-json\/wp\/v2\/tags?post=45933"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}