{"id":381252,"date":"2023-05-12T09:59:04","date_gmt":"2023-05-12T09:59:04","guid":{"rendered":"https:\/\/webkul.com\/blog\/?p=381252"},"modified":"2026-01-06T11:53:43","modified_gmt":"2026-01-06T11:53:43","slug":"how-to-set-dynamic-email-subject-and-content-in-magento2","status":"publish","type":"post","link":"https:\/\/webkul.com\/blog\/how-to-set-dynamic-email-subject-and-content-in-magento2\/","title":{"rendered":"How to set dynamic email subject and content in Magento 2"},"content":{"rendered":"\n<p>Sometimes we need to show customer name, order id, OTP etc in email subject or body.<\/p>\n\n\n\n<p>Here we will use the following <a href=\"https:\/\/webkul.com\/blog\/create-hello-module-in-magento2\/\">Webkul Hello module<\/a> to implement this blog.<br><\/p>\n\n\n\n<p><strong>Step 1 -&gt;<\/strong> Register template in email. Webkul\/Hello\/etc\/email_templates.xml<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">&lt;?xml version=&quot;1.0&quot;?&gt;\n&lt;!--\n\/**\n * Webkul Software.\n *\n * @category  Webkul\n * @package   Webkul_Marketplace\n * @author    Webkul\n * @copyright Copyright (c) Webkul Software Private Limited (https:\/\/webkul.com)\n * @license   https:\/\/store.webkul.com\/license.html\n *\/\n--&gt;\n&lt;config xmlns:xsi=&quot;http:\/\/www.w3.org\/2001\/XMLSchema-instance&quot; xsi:noNamespaceSchemaLocation=&quot;urn:magento:module:Magento_Email:etc\/email_templates.xsd&quot;&gt;\n    &lt;template id=&quot;hello_template&quot; label=&quot;Hello World&quot; file=&quot;hello.html&quot; type=&quot;html&quot; module=&quot;Webkul_Hello&quot; area=&quot;frontend&quot;\/&gt;\n&lt;\/config&gt;<\/pre>\n\n\n\n<p><strong>Step 2 -&gt;<\/strong>  Load email content in Webkul\/Hello\/view\/frontend\/email\/hello.html<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">&lt;!--\n\/**\n * Webkul Software.\n *\n * @category  Webkul\n * @package   Webkul_Marketplace\n * @author    Webkul\n * @copyright Copyright (c) Webkul Software Private Limited (https:\/\/webkul.com)\n * @license   https:\/\/store.webkul.com\/license.html\n *\/\n--&gt;\n&lt;!--@subject {{trans &quot;Customer has uploaded attachment on %order_id&quot; order_id=$orderId }} @--&gt;\n&lt;!--@styles\nbody,td { color:#2f2f2f; font:11px\/1.35em Verdana, Arial, Helvetica, sans-serif; }\n@--&gt;\n{{template config_path=&quot;design\/email\/header_template&quot;}}\n&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; width=&quot;100%&quot;&gt;\n    &lt;tr&gt;\n        &lt;td align=&quot;center&quot; valign=&quot;top&quot; style=&quot;padding:20px 0 20px 0&quot;&gt;\n            &lt;table bgcolor=&quot;#FFFFFF&quot; cellspacing=&quot;0&quot; cellpadding=&quot;10&quot; border=&quot;0&quot; width=&quot;650&quot; style=&quot;border:1px solid #E0E0E0;&quot;&gt;\n                &lt;tr&gt;\n                    &lt;td valign=&quot;top&quot;&gt;\n                        &lt;h1 style=&quot;font-size:22px;font-weight:normal;line-height:22px;margin:0 0 11px 0;&quot;&gt;{{trans &quot;Hello&quot;}},&lt;\/h1&gt;\n                    &lt;\/td&gt;\n                &lt;\/tr&gt;\n                &lt;tr&gt;\n                    &lt;td&gt;\n                        &lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; width=&quot;650&quot;&gt;\n                            &lt;tbody&gt;\n                                &lt;tr&gt;\n                                    &lt;td colspan=&quot;2&quot; valign=&quot;top&quot; style=&quot;font-size:24px;padding:7px 9px 9px 9px;border:1px solid #EAEAEA;&quot;&gt;\n                                            &lt;b&gt;{{trans &quot;Order Id: &quot;}}{{var orderId}}&lt;\/b&gt;\n                                    &lt;\/td&gt;\n                                &lt;\/tr&gt;\n                                &lt;tr&gt;\n                                    &lt;td colspan=&quot;2&quot; valign=&quot;top&quot; style=&quot;font-size:12px;padding:7px 9px 9px 9px;border:1px solid #EAEAEA;&quot;&gt;\n                                        {{trans &quot;A Customer %customer_name has uploaded attachment in order %order_id&quot; customer_name=$customer_name order_id=$orderId}}\n                                    &lt;\/td&gt;\n                                &lt;\/tr&gt;\n                            &lt;\/tbody&gt;\n                        &lt;\/table&gt;\n                    &lt;\/td&gt;\n                &lt;\/tr&gt;\n                &lt;tr&gt;\n                    &lt;td bgcolor=&quot;#EAEAEA&quot; align=&quot;center&quot; style=&quot;background:#EAEAEA;text-align:center;&quot;&gt;\n                        &lt;center&gt;\n                            &lt;p style=&quot;font-size:12px;margin:0;&quot;&gt;\n                                &lt;strong&gt;{{trans &quot;Thank you&quot;}}&lt;\/strong&gt;\n                            &lt;\/p&gt;\n                        &lt;\/center&gt;\n                    &lt;\/td&gt;\n                &lt;\/tr&gt;\n            &lt;\/table&gt;\n        &lt;\/td&gt;\n    &lt;\/tr&gt;\n&lt;\/table&gt;\n{{template config_path=&quot;design\/email\/footer_template&quot;}}<\/pre>\n\n\n\n<p><strong>Step 3 -&gt;<\/strong>  Load template with dynamic variables and send mail.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">\/**\n * Webkul Software.\n *\n * @category  Webkul\n * @package   Webkul_Marketplace\n * @author    Webkul\n * @copyright Copyright (c) Webkul Software Private Limited (https:\/\/webkul.com)\n * @license   https:\/\/store.webkul.com\/license.html\n *\/\n\/** @var $storeManager \\Magento\\Store\\Model\\StoreManagerInterface $storeManager **\/\n\/** @var $transportBuilder \\Magento\\Framework\\Mail\\Template\\TransportBuilder **\/\n\/** @var $inlineTranslation \\Magento\\Framework\\Translate\\Inline\\StateInterface **\/\n$templateOptions = &#091;\n    &#039;area&#039; =&gt; \\Magento\\Framework\\App\\Area::AREA_FRONTEND,\n    &#039;store&#039; =&gt; $storeManager-&gt;getStore()-&gt;getId()\n];\n$templateVars =  &#091;\n    &#039;orderId&#039; =&gt; &quot;#00000009&quot;,\n    &#039;customer_name&#039; =&gt; &quot;Share Khan&quot;\n];\n$from = &#091;&#039;email&#039; =&gt; &quot;rastcdex.754@gmail.com&quot;, &#039;name&#039; =&gt; &#039;Admin&#039;];\n$inlineTranslation-&gt;suspend();\n$to = &#091;&#039;dexona.754@gmail.com&#039;];\n$transport = $transportBuilder-&gt;setTemplateIdentifier(&#039;hello_template&#039;)\n                -&gt;setTemplateOptions($templateOptions)\n                -&gt;setTemplateVars($templateVars)\n                -&gt;setFrom($from)\n                -&gt;addTo($to)\n                -&gt;getTransport();\n$transport-&gt;sendMessage();\n$inlineTranslation-&gt;resume();<\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1200\" height=\"598\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/05\/Screenshot-from-2023-05-12-15-39-46-1200x598.png\" alt=\"Screenshot-from-2023-05-12-15-39-46\" class=\"wp-image-381264\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/05\/Screenshot-from-2023-05-12-15-39-46-1200x598.png 1200w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/05\/Screenshot-from-2023-05-12-15-39-46-300x149.png 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/05\/Screenshot-from-2023-05-12-15-39-46-250x125.png 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/05\/Screenshot-from-2023-05-12-15-39-46-768x382.png 768w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/05\/Screenshot-from-2023-05-12-15-39-46.png 1257w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" loading=\"lazy\" \/><\/figure>\n\n\n\n<p>Thanks \ud83d\ude42<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Sometimes we need to show customer name, order id, OTP etc in email subject or body. Here we will use the following Webkul Hello module to implement this blog. Step 1 -&gt; Register template in email. Webkul\/Hello\/etc\/email_templates.xml Step 2 -&gt; Load email content in Webkul\/Hello\/view\/frontend\/email\/hello.html Step 3 -&gt; Load template with dynamic variables and send <a href=\"https:\/\/webkul.com\/blog\/how-to-set-dynamic-email-subject-and-content-in-magento2\/\">[&#8230;]<\/a><\/p>\n","protected":false},"author":440,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-381252","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to set dynamic email subject and content in Magento 2 - Webkul Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/webkul.com\/blog\/how-to-set-dynamic-email-subject-and-content-in-magento2\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to set dynamic email subject and content in Magento 2 - Webkul Blog\" \/>\n<meta property=\"og:description\" content=\"Sometimes we need to show customer name, order id, OTP etc in email subject or body. Here we will use the following Webkul Hello module to implement this blog. Step 1 -&gt; Register template in email. Webkul\/Hello\/etc\/email_templates.xml Step 2 -&gt; Load email content in Webkul\/Hello\/view\/frontend\/email\/hello.html Step 3 -&gt; Load template with dynamic variables and send [...]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/webkul.com\/blog\/how-to-set-dynamic-email-subject-and-content-in-magento2\/\" \/>\n<meta property=\"og:site_name\" content=\"Webkul Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/webkul\/\" \/>\n<meta property=\"article:published_time\" content=\"2023-05-12T09:59:04+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-01-06T11:53:43+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2023\/05\/Screenshot-from-2023-05-12-15-39-46-1200x598.png\" \/>\n<meta name=\"author\" content=\"Amir Khan\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@webkul\" \/>\n<meta name=\"twitter:site\" content=\"@webkul\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Amir Khan\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/webkul.com\/blog\/how-to-set-dynamic-email-subject-and-content-in-magento2\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/how-to-set-dynamic-email-subject-and-content-in-magento2\/\"},\"author\":{\"name\":\"Amir Khan\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/f2493d3639b5e8c05ae4e9af5f71063a\"},\"headline\":\"How to set dynamic email subject and content in Magento 2\",\"datePublished\":\"2023-05-12T09:59:04+00:00\",\"dateModified\":\"2026-01-06T11:53:43+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/how-to-set-dynamic-email-subject-and-content-in-magento2\/\"},\"wordCount\":78,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/how-to-set-dynamic-email-subject-and-content-in-magento2\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2023\/05\/Screenshot-from-2023-05-12-15-39-46-1200x598.png\",\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/webkul.com\/blog\/how-to-set-dynamic-email-subject-and-content-in-magento2\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/webkul.com\/blog\/how-to-set-dynamic-email-subject-and-content-in-magento2\/\",\"url\":\"https:\/\/webkul.com\/blog\/how-to-set-dynamic-email-subject-and-content-in-magento2\/\",\"name\":\"How to set dynamic email subject and content in Magento 2 - Webkul Blog\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/how-to-set-dynamic-email-subject-and-content-in-magento2\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/how-to-set-dynamic-email-subject-and-content-in-magento2\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2023\/05\/Screenshot-from-2023-05-12-15-39-46-1200x598.png\",\"datePublished\":\"2023-05-12T09:59:04+00:00\",\"dateModified\":\"2026-01-06T11:53:43+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/webkul.com\/blog\/how-to-set-dynamic-email-subject-and-content-in-magento2\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/webkul.com\/blog\/how-to-set-dynamic-email-subject-and-content-in-magento2\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/how-to-set-dynamic-email-subject-and-content-in-magento2\/#primaryimage\",\"url\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/05\/Screenshot-from-2023-05-12-15-39-46.png\",\"contentUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/05\/Screenshot-from-2023-05-12-15-39-46.png\",\"width\":1257,\"height\":626,\"caption\":\"Screenshot-from-2023-05-12-15-39-46\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/webkul.com\/blog\/how-to-set-dynamic-email-subject-and-content-in-magento2\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/webkul.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to set dynamic email subject and content in Magento 2\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/webkul.com\/blog\/#website\",\"url\":\"https:\/\/webkul.com\/blog\/\",\"name\":\"Webkul Blog\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/webkul.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/webkul.com\/blog\/#organization\",\"name\":\"WebKul Software Private Limited\",\"url\":\"https:\/\/webkul.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png\",\"contentUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png\",\"width\":380,\"height\":380,\"caption\":\"WebKul Software Private Limited\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/webkul\/\",\"https:\/\/x.com\/webkul\",\"https:\/\/www.instagram.com\/webkul\/\",\"https:\/\/www.linkedin.com\/company\/webkul\",\"https:\/\/www.youtube.com\/user\/webkul\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/f2493d3639b5e8c05ae4e9af5f71063a\",\"name\":\"Amir Khan\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/da678755fca2993231591a761683dc95fcf81f335982ea5c1b38e9ccc1c6bc0c?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/da678755fca2993231591a761683dc95fcf81f335982ea5c1b38e9ccc1c6bc0c?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g\",\"caption\":\"Amir Khan\"},\"url\":\"https:\/\/webkul.com\/blog\/author\/amir-khan754\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to set dynamic email subject and content in Magento 2 - Webkul Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/webkul.com\/blog\/how-to-set-dynamic-email-subject-and-content-in-magento2\/","og_locale":"en_US","og_type":"article","og_title":"How to set dynamic email subject and content in Magento 2 - Webkul Blog","og_description":"Sometimes we need to show customer name, order id, OTP etc in email subject or body. Here we will use the following Webkul Hello module to implement this blog. Step 1 -&gt; Register template in email. Webkul\/Hello\/etc\/email_templates.xml Step 2 -&gt; Load email content in Webkul\/Hello\/view\/frontend\/email\/hello.html Step 3 -&gt; Load template with dynamic variables and send [...]","og_url":"https:\/\/webkul.com\/blog\/how-to-set-dynamic-email-subject-and-content-in-magento2\/","og_site_name":"Webkul Blog","article_publisher":"https:\/\/www.facebook.com\/webkul\/","article_published_time":"2023-05-12T09:59:04+00:00","article_modified_time":"2026-01-06T11:53:43+00:00","og_image":[{"url":"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2023\/05\/Screenshot-from-2023-05-12-15-39-46-1200x598.png","type":"","width":"","height":""}],"author":"Amir Khan","twitter_card":"summary_large_image","twitter_creator":"@webkul","twitter_site":"@webkul","twitter_misc":{"Written by":"Amir Khan","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/webkul.com\/blog\/how-to-set-dynamic-email-subject-and-content-in-magento2\/#article","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/how-to-set-dynamic-email-subject-and-content-in-magento2\/"},"author":{"name":"Amir Khan","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/f2493d3639b5e8c05ae4e9af5f71063a"},"headline":"How to set dynamic email subject and content in Magento 2","datePublished":"2023-05-12T09:59:04+00:00","dateModified":"2026-01-06T11:53:43+00:00","mainEntityOfPage":{"@id":"https:\/\/webkul.com\/blog\/how-to-set-dynamic-email-subject-and-content-in-magento2\/"},"wordCount":78,"commentCount":0,"publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"image":{"@id":"https:\/\/webkul.com\/blog\/how-to-set-dynamic-email-subject-and-content-in-magento2\/#primaryimage"},"thumbnailUrl":"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2023\/05\/Screenshot-from-2023-05-12-15-39-46-1200x598.png","inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/webkul.com\/blog\/how-to-set-dynamic-email-subject-and-content-in-magento2\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/webkul.com\/blog\/how-to-set-dynamic-email-subject-and-content-in-magento2\/","url":"https:\/\/webkul.com\/blog\/how-to-set-dynamic-email-subject-and-content-in-magento2\/","name":"How to set dynamic email subject and content in Magento 2 - Webkul Blog","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/webkul.com\/blog\/how-to-set-dynamic-email-subject-and-content-in-magento2\/#primaryimage"},"image":{"@id":"https:\/\/webkul.com\/blog\/how-to-set-dynamic-email-subject-and-content-in-magento2\/#primaryimage"},"thumbnailUrl":"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2023\/05\/Screenshot-from-2023-05-12-15-39-46-1200x598.png","datePublished":"2023-05-12T09:59:04+00:00","dateModified":"2026-01-06T11:53:43+00:00","breadcrumb":{"@id":"https:\/\/webkul.com\/blog\/how-to-set-dynamic-email-subject-and-content-in-magento2\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/webkul.com\/blog\/how-to-set-dynamic-email-subject-and-content-in-magento2\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/how-to-set-dynamic-email-subject-and-content-in-magento2\/#primaryimage","url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/05\/Screenshot-from-2023-05-12-15-39-46.png","contentUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/05\/Screenshot-from-2023-05-12-15-39-46.png","width":1257,"height":626,"caption":"Screenshot-from-2023-05-12-15-39-46"},{"@type":"BreadcrumbList","@id":"https:\/\/webkul.com\/blog\/how-to-set-dynamic-email-subject-and-content-in-magento2\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/webkul.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to set dynamic email subject and content in Magento 2"}]},{"@type":"WebSite","@id":"https:\/\/webkul.com\/blog\/#website","url":"https:\/\/webkul.com\/blog\/","name":"Webkul Blog","description":"","publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/webkul.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/webkul.com\/blog\/#organization","name":"WebKul Software Private Limited","url":"https:\/\/webkul.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png","contentUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png","width":380,"height":380,"caption":"WebKul Software Private Limited"},"image":{"@id":"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/webkul\/","https:\/\/x.com\/webkul","https:\/\/www.instagram.com\/webkul\/","https:\/\/www.linkedin.com\/company\/webkul","https:\/\/www.youtube.com\/user\/webkul\/"]},{"@type":"Person","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/f2493d3639b5e8c05ae4e9af5f71063a","name":"Amir Khan","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/da678755fca2993231591a761683dc95fcf81f335982ea5c1b38e9ccc1c6bc0c?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/da678755fca2993231591a761683dc95fcf81f335982ea5c1b38e9ccc1c6bc0c?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g","caption":"Amir Khan"},"url":"https:\/\/webkul.com\/blog\/author\/amir-khan754\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/381252","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/users\/440"}],"replies":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/comments?post=381252"}],"version-history":[{"count":12,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/381252\/revisions"}],"predecessor-version":[{"id":520771,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/381252\/revisions\/520771"}],"wp:attachment":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/media?parent=381252"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/categories?post=381252"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/tags?post=381252"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}