{"id":303630,"date":"2021-08-30T20:45:41","date_gmt":"2021-08-30T20:45:41","guid":{"rendered":"https:\/\/webkul.com\/blog\/?p=303630"},"modified":"2023-05-01T12:44:48","modified_gmt":"2023-05-01T12:44:48","slug":"email-attachment-for-order-invoice-in-magento-2","status":"publish","type":"post","link":"https:\/\/webkul.com\/blog\/email-attachment-for-order-invoice-in-magento-2\/","title":{"rendered":"Magento 2 &#8211; Adding attachment in order invoice email"},"content":{"rendered":"\n<p>Sometimes, we need to attach a file with the order invoice email, so here are the steps to achieve the same.  <\/p>\n\n\n\n<p>first of all create TransportBuilder class in <strong>app\/code\/Vendor\/Module \/Mail\/Template\/ TransportBuilder.php<\/strong><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">&lt;?php\n\nnamespace Vendor\\Module\\Mail\\Template;\n\nclass TransportBuilder extends \\Magento\\Framework\\Mail\\Template\\TransportBuilder\n{\n   \/**\n    * addAttachment\n    *\n    * @param mixed $body\n    * @param string $filename\n    * @param mixed $mimeType\n    * @param mixed $disposition\n    * @param mixed $encoding\n    * @return object\n    *\/\n    public function addAttachment(\n        $body,\n        $filename = null,\n        $mimeType = \\Zend_Mime::TYPE_OCTETSTREAM,\n        $disposition = \\Zend_Mime::DISPOSITION_ATTACHMENT,\n        $encoding = \\Zend_Mime::ENCODING_BASE64\n    ) {\n        $attachmentPart = new \\Zend\\Mime\\Part();\n        $attachmentPart-&gt;setContent($body)\n            -&gt;setType($mimeType)\n            -&gt;setFileName($filename)\n            -&gt;setEncoding($encoding)\n            -&gt;setDisposition($disposition);\n\n        return $attachmentPart;\n    }\n}<\/pre>\n\n\n\n<p>Now, create the SenderBuilder class to add <a href=\"https:\/\/store.webkul.com\/magento2-product-attachment.html\">attachment<\/a> files which is extend to core class <em>\\Magento\\Sales\\Model<\/em> <em>\\Order\\Email\\ SenderBuilder<\/em>. You can add image\/pdf\/docx\/calender etc. files with <a href=\"https:\/\/store.webkul.com\/magento2-smtp-extension.html\">email<\/a>. <\/p>\n\n\n\n<p>Add the SenderBuilder file in  <strong>app\/code\/Vendor\/Module\/Model\/Sales\/Order\/Email\/SenderBuilder.php<\/strong>.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">&lt;?php\n\nnamespace Vendor\\Module\\Model\\Sales\\Order\\Email;\n\nuse Magento\\Framework\\Mail\\Template\\TransportBuilder;\nuse Magento\\Framework\\Mail\\Template\\TransportBuilderByStore;\nuse Magento\\Sales\\Model\\Order\\Email\\Container\\IdentityInterface;\nuse Magento\\Sales\\Model\\Order\\Email\\Container\\Template;\n\n\/**\n * Email sender builder for attachments\n *\/\nclass SenderBuilder extends \\Magento\\Sales\\Model\\Order\\Email\\SenderBuilder\n{\n    \/**\n     * @param Template $templateContainer\n     * @param IdentityInterface $identityContainer\n     * @param TransportBuilder $transportBuilder\n     * @param TransportBuilderByStore $transportBuilderByStore\n     * @param \\Magento\\Framework\\Filesystem\\Driver\\File $reader\n     *\/\n    public function __construct(\n        Template $templateContainer,\n        IdentityInterface $identityContainer,\n        TransportBuilder $transportBuilder,\n        TransportBuilderByStore $transportBuilderByStore = null,\n        \\Vendor\\Module\\Helper\\Data $helper,\n        \\Magento\\Framework\\Filesystem\\Driver\\File $reader\n    ) {\n        parent::__construct(\n            $templateContainer,\n            $identityContainer,\n            $transportBuilder\n        );\n        $this-&gt;helper = $helper;\n        $this-&gt;reader = $reader;\n    }\n\n    \/**\n     * Prepare and send email message\n     *\n     * @return void\n     *\/\n    public function send()\n    {\n        $this-&gt;configureEmailTemplate();\n\n        $this-&gt;transportBuilder-&gt;addTo(\n            $this-&gt;identityContainer-&gt;getCustomerEmail(),\n            $this-&gt;identityContainer-&gt;getCustomerName()\n        );\n\n        $copyTo = $this-&gt;identityContainer-&gt;getEmailCopyTo();\n\n        if (!empty($copyTo) &amp;&amp; $this-&gt;identityContainer-&gt;getCopyMethod() == &#039;bcc&#039;) {\n            foreach ($copyTo as $email) {\n                $this-&gt;transportBuilder-&gt;addBcc($email);\n            }\n        }\n\n        \/* to attach events in invoice email *\/\n        $templateVars = $this-&gt;templateContainer-&gt;getTemplateVars();\n        $transport = $this-&gt;transportBuilder-&gt;getTransport();\n\n        if (!empty($templateVars&#091;&#039;order&#039;])) {\n            $order = $templateVars&#091;&#039;order&#039;];\n            foreach ($order-&gt;getAllItems() as $item) {\n                $data = $this-&gt;helper-&gt;createPdfFile($item, $order-&gt;getId());\n                if (!empty($data) &amp;&amp; !empty($data&#091;&#039;filename&#039;]) &amp;&amp; !empty($data&#091;&#039;pdfFile&#039;])) {\n                    \/\/ adds attachment in mail\n                    $attachmentPart = $this-&gt;transportBuilder-&gt;addAttachment(\n                        $this-&gt;reader-&gt;fileGetContents($data&#091;&#039;pdfFile&#039;]),\n                        $data&#091;&#039;filename&#039;],\n                        &#039;application\/pdf&#039;\n                    );\n\n                    $message = $transport-&gt;getMessage();\n                    $body = \\Zend\\Mail\\Message::fromString($message-&gt;getRawMessage())-&gt;getBody();\n                    $body = \\Zend_Mime_Decode::decodeQuotedPrintable($body);\n                    $html = &#039;&#039;;\n\n                    if ($body instanceof \\Zend\\Mime\\Message) {\n                        $html = $body-&gt;generateMessage(\\Zend\\Mail\\Headers::EOL);\n                    } elseif ($body instanceof \\Magento\\Framework\\Mail\\MimeMessage) {\n                        $html = (string) $body-&gt;getMessage();\n                    } elseif ($body instanceof \\Magento\\Framework\\Mail\\EmailMessage) {\n                        $html = (string) $body-&gt;getBodyText();\n                    } else {\n                        $html = (string) $body;\n                    }\n\n                    $htmlPart = new \\Zend\\Mime\\Part($html);\n                    $htmlPart-&gt;setCharset(&#039;utf-8&#039;);\n                    $htmlPart-&gt;setEncoding(\\Zend_Mime::ENCODING_QUOTEDPRINTABLE);\n                    $htmlPart-&gt;setDisposition(\\Zend_Mime::DISPOSITION_INLINE);\n                    $htmlPart-&gt;setType(\\Zend_Mime::TYPE_HTML);\n                    $parts = &#091;$htmlPart, $attachmentPart];\n\n                    $bodyPart = new \\Zend\\Mime\\Message();\n                    $bodyPart-&gt;setParts($parts);\n                    $message-&gt;setBody($bodyPart);\n                }\n            }\n        }\n\n        $transport-&gt;sendMessage();\n    }\n}<\/pre>\n\n\n\n<p>Finally, add the following code in <strong>app\/code\/Vendor\/Module\/etc\/di.xml<\/strong> to use TransportBuilder class of your module and you are good to go.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">&lt;?xml version=&quot;1.0&quot;?&gt;\n&lt;config xmlns:xsi=&quot;http:\/\/www.w3.org\/2001\/XMLSchema-instance&quot; xsi:noNamespaceSchemaLocation=&quot;urn:magento:framework:ObjectManager\/etc\/config.xsd&quot;&gt;\n  &lt;preference for=&quot;\\Magento\\Framework\\Mail\\Template\\TransportBuilder&quot; type=&quot;Vendor\\Module\\Model\\Mail\\TransportBuilder&quot; \/&gt;\n&lt;\/config&gt;\n\nMoreover, you can also view our module &lt;a href=&quot;https:\/\/store.webkul.com\/magento2-order-attachment.html&quot;&gt;Magento 2 Order attachment&lt;\/a&gt;.<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Sometimes, we need to attach a file with the order invoice email, so here are the steps to achieve the same. first of all create TransportBuilder class in app\/code\/Vendor\/Module \/Mail\/Template\/ TransportBuilder.php Now, create the SenderBuilder class to add attachment files which is extend to core class \\Magento\\Sales\\Model \\Order\\Email\\ SenderBuilder. You can add image\/pdf\/docx\/calender etc. files <a href=\"https:\/\/webkul.com\/blog\/email-attachment-for-order-invoice-in-magento-2\/\">[&#8230;]<\/a><\/p>\n","protected":false},"author":374,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[11996,2635,2070,6236],"class_list":["post-303630","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-email-attachment","tag-invoice","tag-magento2","tag-orders"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Magento 2 - Adding attachment in order invoice email - 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\/email-attachment-for-order-invoice-in-magento-2\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Magento 2 - Adding attachment in order invoice email - Webkul Blog\" \/>\n<meta property=\"og:description\" content=\"Sometimes, we need to attach a file with the order invoice email, so here are the steps to achieve the same. first of all create TransportBuilder class in app\/code\/Vendor\/Module \/Mail\/Template\/ TransportBuilder.php Now, create the SenderBuilder class to add attachment files which is extend to core class MagentoSalesModel OrderEmail SenderBuilder. You can add image\/pdf\/docx\/calender etc. files [...]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/webkul.com\/blog\/email-attachment-for-order-invoice-in-magento-2\/\" \/>\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=\"2021-08-30T20:45:41+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-05-01T12:44:48+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-og.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"630\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Vikas Kumar\" \/>\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=\"Vikas Kumar\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/webkul.com\/blog\/email-attachment-for-order-invoice-in-magento-2\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/email-attachment-for-order-invoice-in-magento-2\/\"},\"author\":{\"name\":\"Vikas Kumar\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/6910d43276a0e3ae1898e975fe776459\"},\"headline\":\"Magento 2 &#8211; Adding attachment in order invoice email\",\"datePublished\":\"2021-08-30T20:45:41+00:00\",\"dateModified\":\"2023-05-01T12:44:48+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/email-attachment-for-order-invoice-in-magento-2\/\"},\"wordCount\":117,\"commentCount\":4,\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"keywords\":[\"email attachment\",\"invoice\",\"Magento2\",\"orders\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/webkul.com\/blog\/email-attachment-for-order-invoice-in-magento-2\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/webkul.com\/blog\/email-attachment-for-order-invoice-in-magento-2\/\",\"url\":\"https:\/\/webkul.com\/blog\/email-attachment-for-order-invoice-in-magento-2\/\",\"name\":\"Magento 2 - Adding attachment in order invoice email - Webkul Blog\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/#website\"},\"datePublished\":\"2021-08-30T20:45:41+00:00\",\"dateModified\":\"2023-05-01T12:44:48+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/webkul.com\/blog\/email-attachment-for-order-invoice-in-magento-2\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/webkul.com\/blog\/email-attachment-for-order-invoice-in-magento-2\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/webkul.com\/blog\/email-attachment-for-order-invoice-in-magento-2\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/webkul.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Magento 2 &#8211; Adding attachment in order invoice email\"}]},{\"@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\/6910d43276a0e3ae1898e975fe776459\",\"name\":\"Vikas Kumar\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/a1f97f9ad9c92b4555356e4f61d353b1a80aa3cba806e550a0c12fadc7a0306e?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\/a1f97f9ad9c92b4555356e4f61d353b1a80aa3cba806e550a0c12fadc7a0306e?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g\",\"caption\":\"Vikas Kumar\"},\"url\":\"https:\/\/webkul.com\/blog\/author\/vikaskumar-mg117\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Magento 2 - Adding attachment in order invoice email - 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\/email-attachment-for-order-invoice-in-magento-2\/","og_locale":"en_US","og_type":"article","og_title":"Magento 2 - Adding attachment in order invoice email - Webkul Blog","og_description":"Sometimes, we need to attach a file with the order invoice email, so here are the steps to achieve the same. first of all create TransportBuilder class in app\/code\/Vendor\/Module \/Mail\/Template\/ TransportBuilder.php Now, create the SenderBuilder class to add attachment files which is extend to core class MagentoSalesModel OrderEmail SenderBuilder. You can add image\/pdf\/docx\/calender etc. files [...]","og_url":"https:\/\/webkul.com\/blog\/email-attachment-for-order-invoice-in-magento-2\/","og_site_name":"Webkul Blog","article_publisher":"https:\/\/www.facebook.com\/webkul\/","article_published_time":"2021-08-30T20:45:41+00:00","article_modified_time":"2023-05-01T12:44:48+00:00","og_image":[{"width":1200,"height":630,"url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-og.png","type":"image\/png"}],"author":"Vikas Kumar","twitter_card":"summary_large_image","twitter_creator":"@webkul","twitter_site":"@webkul","twitter_misc":{"Written by":"Vikas Kumar","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/webkul.com\/blog\/email-attachment-for-order-invoice-in-magento-2\/#article","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/email-attachment-for-order-invoice-in-magento-2\/"},"author":{"name":"Vikas Kumar","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/6910d43276a0e3ae1898e975fe776459"},"headline":"Magento 2 &#8211; Adding attachment in order invoice email","datePublished":"2021-08-30T20:45:41+00:00","dateModified":"2023-05-01T12:44:48+00:00","mainEntityOfPage":{"@id":"https:\/\/webkul.com\/blog\/email-attachment-for-order-invoice-in-magento-2\/"},"wordCount":117,"commentCount":4,"publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"keywords":["email attachment","invoice","Magento2","orders"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/webkul.com\/blog\/email-attachment-for-order-invoice-in-magento-2\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/webkul.com\/blog\/email-attachment-for-order-invoice-in-magento-2\/","url":"https:\/\/webkul.com\/blog\/email-attachment-for-order-invoice-in-magento-2\/","name":"Magento 2 - Adding attachment in order invoice email - Webkul Blog","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/#website"},"datePublished":"2021-08-30T20:45:41+00:00","dateModified":"2023-05-01T12:44:48+00:00","breadcrumb":{"@id":"https:\/\/webkul.com\/blog\/email-attachment-for-order-invoice-in-magento-2\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/webkul.com\/blog\/email-attachment-for-order-invoice-in-magento-2\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/webkul.com\/blog\/email-attachment-for-order-invoice-in-magento-2\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/webkul.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Magento 2 &#8211; Adding attachment in order invoice email"}]},{"@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\/6910d43276a0e3ae1898e975fe776459","name":"Vikas Kumar","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/a1f97f9ad9c92b4555356e4f61d353b1a80aa3cba806e550a0c12fadc7a0306e?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\/a1f97f9ad9c92b4555356e4f61d353b1a80aa3cba806e550a0c12fadc7a0306e?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g","caption":"Vikas Kumar"},"url":"https:\/\/webkul.com\/blog\/author\/vikaskumar-mg117\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/303630","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\/374"}],"replies":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/comments?post=303630"}],"version-history":[{"count":9,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/303630\/revisions"}],"predecessor-version":[{"id":379216,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/303630\/revisions\/379216"}],"wp:attachment":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/media?parent=303630"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/categories?post=303630"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/tags?post=303630"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}