

{"id":100899,"date":"2021-10-06T09:00:10","date_gmt":"2021-10-06T03:30:10","guid":{"rendered":"https:\/\/data-flair.training\/blogs\/?p=100899"},"modified":"2021-10-06T11:50:54","modified_gmt":"2021-10-06T06:20:54","slug":"nodemailer-nodejs-send-email","status":"publish","type":"post","link":"https:\/\/data-flair.training\/blogs\/nodemailer-nodejs-send-email\/","title":{"rendered":"Nodemailer &#8211; Nodejs Send Email"},"content":{"rendered":"<p>Almost every website nowadays requires sending of emails, so today we will be discussing various ways of sending emails in node js application. The most popular ways of sending mail are nodemailer with smtp, email api and multi channel notification service.<\/p>\n<h3>1. Nodejs Smtp:<\/h3>\n<p>Smtp stands for Simple Mail Transfer Protocol (SMTP). It is used for sending emails across networks and is the most popular transport method.<\/p>\n<p>When we send email using Gmail, an outgoing (SMTP) server picks it and connects with the receiving server. The two servers communicate using guidelines defined by the SMTP protocol. It determines who is the recipient and how they will get the incoming mail.<\/p>\n<h4>Advantages of smtp:<\/h4>\n<ul>\n<li>Easy to set up and integrate with node js application.<\/li>\n<li>Don&#8217;t have to rely on any third-party organization.<\/li>\n<\/ul>\n<h4>Disadvantages of smtp:<\/h4>\n<ul>\n<li>Less secure<\/li>\n<li>It is slower<\/li>\n<\/ul>\n<h3>Nodemailer with smtp:<\/h3>\n<p>It is the most popular node.js module which is used to send email. To install this module run npm install nodemailer.<br \/>\nTo include this module use the require function eg:: let nodemailer=require(\u2018nodemailer\u2019)<\/p>\n<h4>Send Email:<\/h4>\n<p>Nodemailer has a createTransport function that specifies the method we want to use. It takes connection data and credentials as an argument. We will need to define an SMTP host, port, and password for accessing the SMTP server.<\/p>\n<p>For development purposes, we will use Mailtrap, to serve as a fake SMTP server.<\/p>\n<p><strong>Code for sending plain text email using nodemailer:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">const nodemailer = require('nodemailer');\r\nvar transporter = nodemailer.createTransport({\r\n    host: \"smtp.mailtrap.io\",\r\n    port: 2525,\r\n    auth: {\r\n        user: \"47d28bc0172bb8\",\r\n        pass: \"45496c6e73505d\"\r\n    }\r\n});\r\nmessage = {\r\n    from: \"from-example@email.com\",\r\n    to: \"to-example@email.com\",\r\n    subject: \"Subject\",\r\n    text: \"Hello SMTP Email\"\r\n}\r\ntransporter.sendMail(message, function (err, info) {\r\n    if (err) {\r\n        console.log(err)\r\n    } else {\r\n        console.log(info);\r\n    }\r\n})\r\n<\/pre>\n<p><strong>Output<\/strong><\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/09\/nodejs-email.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-100931\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/09\/nodejs-email.png\" alt=\"nodejs email\" width=\"1366\" height=\"723\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/09\/nodejs-email.png 1366w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/09\/nodejs-email-768x406.png 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/09\/nodejs-email-720x381.png 720w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/09\/nodejs-email-520x275.png 520w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/09\/nodejs-email-320x169.png 320w\" sizes=\"auto, (max-width: 1366px) 100vw, 1366px\" \/><\/a><\/p>\n<p>Replace the host, password and user using your mailtrap details and also replace the from and \u2018to\u2019 according to your need and that&#8217;s all just run the file the email id mentioned will receive an email.<\/p>\n<h3>2. Nodejs Transactional Email API:<\/h3>\n<p>It allows us to send email from our app using a hosted API. We can use the email API to handle sending and delivering the email. Transactional email APIs give a reliable service that can be used in our application easily with better functionality.<\/p>\n<h4>Advantages of transactional Email API:<\/h4>\n<ul>\n<li>Easy to set up and integrate with node js application.<\/li>\n<li>It is scalable.<\/li>\n<li>Extra security<\/li>\n<\/ul>\n<h4>Disadvantages of transactional Email Api:<\/h4>\n<ul>\n<li>Have to rely on third-party for sending mails<\/li>\n<li>Have to separately integrate each channel.<\/li>\n<\/ul>\n<h4>Sending Email using Transactional Email API:<\/h4>\n<p>Some of the most popular platforms for sending mail using Transactional Email API are sendgrid and mailgun. In this article, we will be using sendgrid for sending email.<\/p>\n<p>First, create an account in sendgrid (https:\/\/sendgrid.com\/ ). Now go to sendgrid\u2019s dashboard, then settings, then API key, to get the API key.<\/p>\n<p>To install sendgrid run npm install &#8211;save @sendgrid\/mail.<\/p>\n<p>Include it in your file using the require function.<\/p>\n<p>In the below code replace \u2018SENDGRID_API_KEY\u2019 with your SendGrid API key and replace the email address in the \u201cfrom\u201d by the email that you used in creating the sendgrid account, and also replace the \u201cto\u201d email address according to your need. Now you are ready to use sendgrid email service to send emails.<\/p>\n<p><strong>Code for sending email using sendgrid:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">const sendgrid = require('@sendgrid\/mail');\r\n \r\nconst SENDGRID_API_KEY = \"&lt;SENDGRID_API_KEY&gt;\"\r\n \r\nsendgrid.setApiKey(SENDGRID_API_KEY)\r\n \r\nconst msg = {\r\n    to: 'test@example.com',\r\n    from: 'test@example.com',\r\n    subject: 'Sending with SendGrid Is Fun',\r\n    text: 'and easy to do anywhere, even with Node.js',\r\n    html: '&lt;strong&gt;and easy to do anywhere, even with Node.js&lt;\/strong&gt;',\r\n}\r\n \r\nsendgrid\r\n    .send(msg)\r\n    .then((resp) =&gt; {\r\n        console.log('Email sent\\n', resp)\r\n    })\r\n    .catch((error) =&gt; {\r\n        console.error(error)\r\n    })\r\n<\/pre>\n<h3>3. Nodejs Multichannel notification service:<\/h3>\n<p>Courier is the most common Multichannel notification service. It allows us to reach users from different channels using one API. It allows us to bring our own provider for each channel.<\/p>\n<h4>Advantages of Multichannel notification channel:<\/h4>\n<ul>\n<li>Easy to set up and integrate with node js application.<\/li>\n<li>Even non-technical people can edit the content.<\/li>\n<\/ul>\n<h4>Disadvantages of Multichannel notification channel:<\/h4>\n<ul>\n<li>Have to rely on third-party for sending mails<\/li>\n<\/ul>\n<h4>Sending email using Multichannel notification service:<\/h4>\n<p>First create an account on courier then install courier using npm as npm install @trycourier\/courier.<br \/>\nIn the below code replace event id, recipient id, and email with that of your courier data.<\/p>\n<p><strong>Code for sending email using courier client:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">const { CourierClient } = require(\"@trycourier\/courier\");\r\n \r\nconst courier = CourierClient({ authorizationToken: \"&lt;AUTH_TOKEN&gt;\" });\r\n \r\ncourier.send({\r\n    eventId: \"&lt;EVENT ID&gt;\",\r\n    recipientId: \"&lt;RECIPIENT_ID\",\r\n    profile: {\r\n        email: \"&lt;EMAIL_ADDRESS&gt;\"\r\n    },\r\n    data: {}\r\n})\r\n    .then((resp) =&gt; {\r\n        console.log('Email sent', resp)\r\n    })\r\n    .catch((error) =&gt; {\r\n        console.error(error)\r\n    });\r\n<\/pre>\n<h3>Sending HTML Email:<\/h3>\n<p>For sending html email you just have to change the text parameter in the message object to html and then use html in it.<\/p>\n<p><strong>Code for Sending a html Email:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">const msg = {\r\n    to: 'test@example.com',\r\n    from: 'test@example.com',\r\n    subject: 'Sending with SendGrid Is Fun',\r\n    html: '&lt;strong&gt;DataFlair&lt;\/strong&gt;',\r\n}\r\n<\/pre>\n<h3>Sending Email with attachments:<\/h3>\n<p>For sending html email you just have to add an attachment parameter in the message object and then you can attach the file.<\/p>\n<p><strong>Code for sending email with attachments:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">const msg = {\r\n    to: 'test@example.com',\r\n    from: 'test@example.com',\r\n    subject: 'Sending with SendGrid Is Fun',\r\n    html: '&lt;strong&gt;DataFlair&lt;\/strong&gt;',\r\nattachments: [\r\n        { \r\n          filename: 'DataFlair.jpg',\r\n          path:\u2019C:\\Users\\ASUS\\DataFlair\u2019 \r\n      }\r\n    ]\r\n}\r\n<\/pre>\n<h3>Sending email to multiple receivers:<\/h3>\n<p>In order to send email to multiple people,add their email in the \u201cto\u201d parameter and use a comma to separate the emails.<\/p>\n<p><strong>Code for Sending a Email to multiple receiver:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">const msg = {\r\n    to: 'test@example.com',\u2019test1@example.com\u2019,\r\n    from: 'test@example.com',\r\n    subject: 'Sending with SendGrid Is Fun',\r\n    html: '&lt;strong&gt;DataFlair&lt;\/strong&gt;',\r\n}\r\n<\/pre>\n<h3>Conclusion:<\/h3>\n<p>In this blog, we have explored different ways of sending email in a nodejs application. We have learned about smtp, nodemailer, sendgrid and courier. Hope you enjoyed reading the article.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Almost every website nowadays requires sending of emails, so today we will be discussing various ways of sending emails in node js application. The most popular ways of sending mail are nodemailer with smtp,&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":100930,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[25259],"tags":[25280,25277,25279,25276,25278],"class_list":["post-100899","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-node-js-tutorials","tag-nodejs-multichannel-notification-service","tag-nodejs-send-email","tag-nodejs-transactional-email-api","tag-nodemailer","tag-smtp-in-nodejs"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Nodemailer - Nodejs Send Email - DataFlair<\/title>\n<meta name=\"description\" content=\"Learn how to send email in Nodejs, popular ways of sending mail - nodemailer with smtp, email api &amp; multi channel notification service.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/data-flair.training\/blogs\/nodemailer-nodejs-send-email\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Nodemailer - Nodejs Send Email - DataFlair\" \/>\n<meta property=\"og:description\" content=\"Learn how to send email in Nodejs, popular ways of sending mail - nodemailer with smtp, email api &amp; multi channel notification service.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/data-flair.training\/blogs\/nodemailer-nodejs-send-email\/\" \/>\n<meta property=\"og:site_name\" content=\"DataFlair\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/DataFlairWS\/\" \/>\n<meta property=\"article:published_time\" content=\"2021-10-06T03:30:10+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-10-06T06:20:54+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/09\/nodejs-send-email.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"628\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"DataFlair Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:site\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"DataFlair Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Nodemailer - Nodejs Send Email - DataFlair","description":"Learn how to send email in Nodejs, popular ways of sending mail - nodemailer with smtp, email api & multi channel notification service.","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:\/\/data-flair.training\/blogs\/nodemailer-nodejs-send-email\/","og_locale":"en_US","og_type":"article","og_title":"Nodemailer - Nodejs Send Email - DataFlair","og_description":"Learn how to send email in Nodejs, popular ways of sending mail - nodemailer with smtp, email api & multi channel notification service.","og_url":"https:\/\/data-flair.training\/blogs\/nodemailer-nodejs-send-email\/","og_site_name":"DataFlair","article_publisher":"https:\/\/www.facebook.com\/DataFlairWS\/","article_published_time":"2021-10-06T03:30:10+00:00","article_modified_time":"2021-10-06T06:20:54+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/09\/nodejs-send-email.jpg","type":"image\/jpeg"}],"author":"DataFlair Team","twitter_card":"summary_large_image","twitter_creator":"@DataFlairWS","twitter_site":"@DataFlairWS","twitter_misc":{"Written by":"DataFlair Team","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/data-flair.training\/blogs\/nodemailer-nodejs-send-email\/#article","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/nodemailer-nodejs-send-email\/"},"author":{"name":"DataFlair Team","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/b49855299264df5e27e3ec6c2cd9fde9"},"headline":"Nodemailer &#8211; Nodejs Send Email","datePublished":"2021-10-06T03:30:10+00:00","dateModified":"2021-10-06T06:20:54+00:00","mainEntityOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/nodemailer-nodejs-send-email\/"},"wordCount":756,"commentCount":0,"publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/nodemailer-nodejs-send-email\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/09\/nodejs-send-email.jpg","keywords":["Nodejs Multichannel notification service","Nodejs Send Email","Nodejs Transactional Email API","Nodemailer","SMTP in Nodejs"],"articleSection":["Node Js Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/data-flair.training\/blogs\/nodemailer-nodejs-send-email\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/data-flair.training\/blogs\/nodemailer-nodejs-send-email\/","url":"https:\/\/data-flair.training\/blogs\/nodemailer-nodejs-send-email\/","name":"Nodemailer - Nodejs Send Email - DataFlair","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/nodemailer-nodejs-send-email\/#primaryimage"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/nodemailer-nodejs-send-email\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/09\/nodejs-send-email.jpg","datePublished":"2021-10-06T03:30:10+00:00","dateModified":"2021-10-06T06:20:54+00:00","description":"Learn how to send email in Nodejs, popular ways of sending mail - nodemailer with smtp, email api & multi channel notification service.","breadcrumb":{"@id":"https:\/\/data-flair.training\/blogs\/nodemailer-nodejs-send-email\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/data-flair.training\/blogs\/nodemailer-nodejs-send-email\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/nodemailer-nodejs-send-email\/#primaryimage","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/09\/nodejs-send-email.jpg","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/09\/nodejs-send-email.jpg","width":1200,"height":628,"caption":"nodemailer - nodejs send email"},{"@type":"BreadcrumbList","@id":"https:\/\/data-flair.training\/blogs\/nodemailer-nodejs-send-email\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog Home","item":"https:\/\/data-flair.training\/blogs\/"},{"@type":"ListItem","position":2,"name":"Node Js Tutorials","item":"https:\/\/data-flair.training\/blogs\/category\/node-js-tutorials\/"},{"@type":"ListItem","position":3,"name":"Nodemailer &#8211; Nodejs Send Email"}]},{"@type":"WebSite","@id":"https:\/\/data-flair.training\/blogs\/#website","url":"https:\/\/data-flair.training\/blogs\/","name":"DataFlair","description":"Learn Today. Lead Tomorrow.","publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/data-flair.training\/blogs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/data-flair.training\/blogs\/#organization","name":"DataFlair","url":"https:\/\/data-flair.training\/blogs\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","width":106,"height":48,"caption":"DataFlair"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/DataFlairWS\/","https:\/\/x.com\/DataFlairWS","https:\/\/www.linkedin.com\/company\/dataflair-web-services-pvt-ltd\/","https:\/\/www.youtube.com\/user\/DataFlairWS"]},{"@type":"Person","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/b49855299264df5e27e3ec6c2cd9fde9","name":"DataFlair Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/ef46b745ddad2fad690af626c6ef29b91809ad0a9f5ef398d07817d8cad042f5?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/ef46b745ddad2fad690af626c6ef29b91809ad0a9f5ef398d07817d8cad042f5?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/ef46b745ddad2fad690af626c6ef29b91809ad0a9f5ef398d07817d8cad042f5?s=96&d=mm&r=g","caption":"DataFlair Team"},"description":"DataFlair Team is a group of passionate educators and industry experts dedicated to providing high-quality online learning resources on programming, Java, Python, C++, DSA, AI, ML, data Science, Android, Flutter, MERN, Web Development, and technology. With years of experience in the field, the team aims to simplify complex topics and help learners advance their careers. At DataFlair, we believe in empowering students and professionals with the knowledge and skills needed to thrive in today\u2019s fast-paced tech industry. Follow us for Free courses, expert insights, tutorials, and practical tips to boost your learning journey.","url":"https:\/\/data-flair.training\/blogs\/author\/datafbdad\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/100899","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/comments?post=100899"}],"version-history":[{"count":13,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/100899\/revisions"}],"predecessor-version":[{"id":100932,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/100899\/revisions\/100932"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media\/100930"}],"wp:attachment":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media?parent=100899"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/categories?post=100899"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/tags?post=100899"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}