{"id":2001,"date":"2015-11-04T23:14:35","date_gmt":"2015-11-04T23:14:34","guid":{"rendered":"https:\/\/www.couchbase.com\/blog\/?p=2001"},"modified":"2019-05-07T10:09:40","modified_gmt":"2019-05-07T17:09:40","slug":"exploring-couchbase-and-n1ql-through-touchbase-using-node-js-and-angular-js-part-2-email-verification","status":"publish","type":"post","link":"https:\/\/www.couchbase.com\/blog\/exploring-couchbase-and-n1ql-through-touchbase-using-node-js-and-angular-js-part-2-email-verification\/","title":{"rendered":"Exploring Couchbase and N1QL through Touchbase using Node.js and Angular.js \u2013 Part 2: Email Verification with Nodemailer, Sendgrid and Couchbase"},"content":{"rendered":"<h2>Part 2: Email Verification<\/h2>\n<p>In this third installment of building Touchbase, I will go in depth about creating an email verification system using Couchbase, nodemailer, and the Sendgrid Web API. The first thing you will need to do is download a couple of node modules.<\/p>\n<p>The first two installments, <a href=\"https:\/\/www.couchbase.com\/blog\/touchbase-part-0-creating-a-data-model\/\">Part 0<\/a> and <a href=\"https:\/\/www.couchbase.com\/blog\/exploring-couchbase-and-n1ql-through-touchbase-using-node-js-and-angular-js-part-1-creating-a-user-document\/\">Part 1<\/a>, cover the data model and user document creation, respectively.<\/p>\n<h4>Platform Requirements<\/h4>\n<ul>\n<li>Node.js<\/li>\n<li>Express.js<\/li>\n<li>A Sendgrid API account<\/li>\n<li>HTML email generator OR hand composed HTML email<\/li>\n<\/ul>\n<h4>Node Modules used<\/h4>\n<ul>\n<li>Couchbase Node.js SDK\/N1QL (access to Couchbase)<\/li>\n<li>body-parser (convert JSON strings to JSON obj)<\/li>\n<li>uuid (to generate verification doc ID)<\/li>\n<li>nodemailer (send emails from our email confirm API)<\/li>\n<li>nodemailer-sendgrid-transport (send nodemailer emails through Sendgrid)<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p>First, to bring in the node modules, do:<\/p>\n<pre><code>$ npm install nodemailer --save <\/code><\/pre>\n<p>Then:<\/p>\n<pre><code>$ npm install nodemailer-sendgrid-transport --save<\/code><\/pre>\n<p>If you&#8217;re not familiar with Node, npm simply installs modules for you. The <strong>&#8216;&#8211;save&#8217;<\/strong> ending will add these modules to your <strong>package.json<\/strong> file. From the Touchbase github repo, you will see that these are already in the <strong>package.json<\/strong> file.<\/p>\n<p>First, create a Sendgrid account to use their <a href=\"https:\/\/sendgrid.com\/free\">free web API<\/a>. I will assume you have this, and continue on. After that, you will need to do some simple setup of the Sendgrid API to actually send emails using Sendgrid and nodemailer. The explanation of using these two services together is in <a href=\"https:\/\/sendgrid.com\/blog\/sending-email-nodemailer-sendgrid\/\">Sendgrid&#8217;s blog<\/a> and I will go further using that code snippet. My usage of this in the <strong>models\/sessionmodel.js<\/strong> file in a function called <strong>&#8216;Session.makeVerification&#8217;<\/strong>. The endpoint where this function is called can be found in <strong>routes\/routes.js<\/strong> as <strong>&#8216;\/api\/registerUser&#8217;<\/strong>, which I talked about at length <a href=\"https:\/\/www.couchbase.com\/blog\/exploring-couchbase-and-n1ql-through-touchbase-using-node-js-and-angular-js-part-1-creating-a-user-document\/\">in my last blog<\/a>. This function is called at the end of that route to generate a verification email, which the user must click before logging into their account, to avoid abuse of the service.<\/p>\n<p>In the <strong>models\/usermodel.js<\/strong> file, the <strong>&#8216;User.create&#8217;<\/strong> function has a boolean field in the sub-object &#8216;login&#8217; called &#8217;emailVerified&#8217;. The importance of this, is that our verification route will change this attribute of the user to true, allowing them to login if their email has been verified.<\/p>\n<h4>&#8216;Session.makeVerification&#8217; function<\/h4>\n<p><script src=\"https:\/\/gist.github.com\/pranavmayuram\/94731f4fa31cdecf5923.js\"><\/script><\/p>\n<p>Then we call the <strong>Email.create<\/strong> model. If you look into the <strong>models\/emailmodel.js<\/strong> file, you will see an example of how this is done. This simply makes use of an <a href=\"https:\/\/www.accessify.com\/tools-and-wizards\/developer-tools\/html-javascript-convertor\/\">HTML to Javascript string converter<\/a> which generates a Javascript string that is converted into an HTML email in the Sendgrid API.<\/p>\n<p>In our <strong>&#8216;Session.makeVerification&#8217;<\/strong> function, we do some basic setup for the nodemailer and Sendgrid APIs. Put in the options, as well as an API username and password which were setup when you created your Sendgrid account. I chose to use the Sendgrid API and not a personal email account with Nodemailer because Sendgrid allows tracking of all emails, and ensures that they are delivered in time. It will also ensure that none of the emails fall into spam bins, promotion filters, etc. In this way, the emails will be sent securely, and can also be aliased with any email address we desire. In this case I use &#8216;touchbase-noreply@couchbase.com&#8217; which is not an official email, but will clearly show that the email is sent from Touchbase to the user. This can be done <a href=\"https:\/\/github.com\/andris9\/Nodemailer\">without the user of the Sendgrid API<\/a> as well.<\/p>\n<p>The next part of <strong>&#8216;Session.makeVerification&#8217;<\/strong> takes us to <strong>&#8216;Email.create&#8217;<\/strong> to build the HTML template for the emails we will send to users, which calls a function in <strong>models\/emailmodel.js<\/strong>. If you look closely, this function takes an HTML email file and turns it into a Javascript string. Generating HTML emails is a little different than HTML files, as explained in <a href=\"https:\/\/blog.mailchimp.com\/guide-to-creating-custom-mailchimp-email-templates\/\">this great mailchimp article<\/a>. I then used an HTML to Javascript string generator to return the string in the <strong>&#8216;Email.create&#8217;<\/strong> function, which is used as the HTML for the nodemailer email. I pass the req object from the <strong>&#8216;Session.makeVerification&#8217;<\/strong> function to this function, so that it can generate the URL that was used to access the page. This way, if someone was to change the domain for the site, or the IP address that they were testing on, it would consistently generate the right URL for the verification email. The place where this URL is changed is the &#8216;href&#8217; for the HTML page&#8217;s &#8216;Verify&#8217; button, so that when they click the link, it sends them to the URL of their verification ID at <strong>&#8216;\/api\/verify\/:verificationID&#8217;<\/strong>. You can see this API in the <strong>routes\/routes.js<\/strong> file.<\/p>\n<h4>&#8216;\/api\/verify\/:verificationID&#8217; API<\/h4>\n<p><script src=\"https:\/\/gist.github.com\/pranavmayuram\/545fc36282d17dce59d9.js\"><\/script><\/p>\n<p>Via this funciton, we finally send the email verification, so the user will be required to verify the email before they can access their account. The user&#8217;s email verification button will link them to the <strong>&#8216;api\/verify\/:verificationID&#8217;<\/strong> page, where the API will then take the verification ID, as <strong>&#8216;req.params.verificationID&#8217;<\/strong>. It will then send this to a function called <strong>&#8216;Session.verify&#8217;<\/strong> in <strong>models\/sessionmodel.js<\/strong>. This function takes this verificationID, and checks that it exists. It then changes the status of the associated user&#8217;s user document, and sets its &#8216;login.emailVerified&#8217; attribute to true, allowing the user to login. Finally, it deletes the verification document completing the registration process and setting up the application to let the user login.<\/p>\n<h4>&#8216;Session.verify&#8217; function<\/h4>\n<p><script src=\"https:\/\/gist.github.com\/pranavmayuram\/22bdd9bbedb0920e88d5.js\"><\/script><\/p>\n<p>To summarize, we covered how Touchbase generates documents for the email verification process, generates the HTML mail to the user and then updates the user profile once verification has been completed. If you have any questions or feedback, please comment below.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Part 2: Email Verification In this third installment of building Touchbase, I will go in depth about creating an email verification system using Couchbase, nodemailer, and the Sendgrid Web API. The first thing you will need to do is download [&hellip;]<\/p>\n","protected":false},"author":60,"featured_media":13873,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[1],"tags":[],"ppma_author":[9034],"class_list":["post-2001","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.3 (Yoast SEO v27.3) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Email Verification with Nodemailer, Sendgrid &amp; Couchbase<\/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:\/\/www.couchbase.com\/blog\/exploring-couchbase-and-n1ql-through-touchbase-using-node-js-and-angular-js-part-2-email-verification\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Exploring Couchbase and N1QL through Touchbase using Node.js and Angular.js \u2013 Part 2: Email Verification with Nodemailer, Sendgrid and Couchbase\" \/>\n<meta property=\"og:description\" content=\"Part 2: Email Verification In this third installment of building Touchbase, I will go in depth about creating an email verification system using Couchbase, nodemailer, and the Sendgrid Web API. The first thing you will need to do is download [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.couchbase.com\/blog\/exploring-couchbase-and-n1ql-through-touchbase-using-node-js-and-angular-js-part-2-email-verification\/\" \/>\n<meta property=\"og:site_name\" content=\"The Couchbase Blog\" \/>\n<meta property=\"article:published_time\" content=\"2015-11-04T23:14:34+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-05-07T17:09:40+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2022\/11\/couchbase-nosql-dbaas.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1800\" \/>\n\t<meta property=\"og:image:height\" content=\"630\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Pranav Mayuram\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Pranav Mayuram\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/exploring-couchbase-and-n1ql-through-touchbase-using-node-js-and-angular-js-part-2-email-verification\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/exploring-couchbase-and-n1ql-through-touchbase-using-node-js-and-angular-js-part-2-email-verification\\\/\"},\"author\":{\"name\":\"Pranav Mayuram\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#\\\/schema\\\/person\\\/454261061bad5159ad2696e0bf162eaa\"},\"headline\":\"Exploring Couchbase and N1QL through Touchbase using Node.js and Angular.js \u2013 Part 2: Email Verification with Nodemailer, Sendgrid and Couchbase\",\"datePublished\":\"2015-11-04T23:14:34+00:00\",\"dateModified\":\"2019-05-07T17:09:40+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/exploring-couchbase-and-n1ql-through-touchbase-using-node-js-and-angular-js-part-2-email-verification\\\/\"},\"wordCount\":950,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/exploring-couchbase-and-n1ql-through-touchbase-using-node-js-and-angular-js-part-2-email-verification\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/1\\\/2022\\\/11\\\/couchbase-nosql-dbaas.png\",\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/exploring-couchbase-and-n1ql-through-touchbase-using-node-js-and-angular-js-part-2-email-verification\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/exploring-couchbase-and-n1ql-through-touchbase-using-node-js-and-angular-js-part-2-email-verification\\\/\",\"url\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/exploring-couchbase-and-n1ql-through-touchbase-using-node-js-and-angular-js-part-2-email-verification\\\/\",\"name\":\"Email Verification with Nodemailer, Sendgrid & Couchbase\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/exploring-couchbase-and-n1ql-through-touchbase-using-node-js-and-angular-js-part-2-email-verification\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/exploring-couchbase-and-n1ql-through-touchbase-using-node-js-and-angular-js-part-2-email-verification\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/1\\\/2022\\\/11\\\/couchbase-nosql-dbaas.png\",\"datePublished\":\"2015-11-04T23:14:34+00:00\",\"dateModified\":\"2019-05-07T17:09:40+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/exploring-couchbase-and-n1ql-through-touchbase-using-node-js-and-angular-js-part-2-email-verification\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/exploring-couchbase-and-n1ql-through-touchbase-using-node-js-and-angular-js-part-2-email-verification\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/exploring-couchbase-and-n1ql-through-touchbase-using-node-js-and-angular-js-part-2-email-verification\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/1\\\/2022\\\/11\\\/couchbase-nosql-dbaas.png\",\"contentUrl\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/1\\\/2022\\\/11\\\/couchbase-nosql-dbaas.png\",\"width\":1800,\"height\":630},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/exploring-couchbase-and-n1ql-through-touchbase-using-node-js-and-angular-js-part-2-email-verification\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Exploring Couchbase and N1QL through Touchbase using Node.js and Angular.js \u2013 Part 2: Email Verification with Nodemailer, Sendgrid and Couchbase\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/\",\"name\":\"The Couchbase Blog\",\"description\":\"Couchbase, the NoSQL Database\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#organization\",\"name\":\"The Couchbase Blog\",\"url\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/04\\\/admin-logo.png\",\"contentUrl\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/04\\\/admin-logo.png\",\"width\":218,\"height\":34,\"caption\":\"The Couchbase Blog\"},\"image\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#\\\/schema\\\/person\\\/454261061bad5159ad2696e0bf162eaa\",\"name\":\"Pranav Mayuram\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/de8b1b457fdc2f5f8b407ef8bf0bfcacb1e2be0ab9de2cee8e8aa4ee7f985709?s=96&d=mm&r=g61baa4ff0f18aa9a8ce672f0f97f1ac0\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/de8b1b457fdc2f5f8b407ef8bf0bfcacb1e2be0ab9de2cee8e8aa4ee7f985709?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/de8b1b457fdc2f5f8b407ef8bf0bfcacb1e2be0ab9de2cee8e8aa4ee7f985709?s=96&d=mm&r=g\",\"caption\":\"Pranav Mayuram\"},\"description\":\"Pranav Mayuram is a N1QL Query language intern, Couchbase. Built a social network platform, Touchbase, using Couchbase Server, Node.js, Express &amp; Angular.js.\",\"url\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/author\\\/pranav-mayuram\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Email Verification with Nodemailer, Sendgrid & Couchbase","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:\/\/www.couchbase.com\/blog\/exploring-couchbase-and-n1ql-through-touchbase-using-node-js-and-angular-js-part-2-email-verification\/","og_locale":"en_US","og_type":"article","og_title":"Exploring Couchbase and N1QL through Touchbase using Node.js and Angular.js \u2013 Part 2: Email Verification with Nodemailer, Sendgrid and Couchbase","og_description":"Part 2: Email Verification In this third installment of building Touchbase, I will go in depth about creating an email verification system using Couchbase, nodemailer, and the Sendgrid Web API. The first thing you will need to do is download [&hellip;]","og_url":"https:\/\/www.couchbase.com\/blog\/exploring-couchbase-and-n1ql-through-touchbase-using-node-js-and-angular-js-part-2-email-verification\/","og_site_name":"The Couchbase Blog","article_published_time":"2015-11-04T23:14:34+00:00","article_modified_time":"2019-05-07T17:09:40+00:00","og_image":[{"width":1800,"height":630,"url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2022\/11\/couchbase-nosql-dbaas.png","type":"image\/png"}],"author":"Pranav Mayuram","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Pranav Mayuram","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.couchbase.com\/blog\/exploring-couchbase-and-n1ql-through-touchbase-using-node-js-and-angular-js-part-2-email-verification\/#article","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/exploring-couchbase-and-n1ql-through-touchbase-using-node-js-and-angular-js-part-2-email-verification\/"},"author":{"name":"Pranav Mayuram","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/454261061bad5159ad2696e0bf162eaa"},"headline":"Exploring Couchbase and N1QL through Touchbase using Node.js and Angular.js \u2013 Part 2: Email Verification with Nodemailer, Sendgrid and Couchbase","datePublished":"2015-11-04T23:14:34+00:00","dateModified":"2019-05-07T17:09:40+00:00","mainEntityOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/exploring-couchbase-and-n1ql-through-touchbase-using-node-js-and-angular-js-part-2-email-verification\/"},"wordCount":950,"commentCount":0,"publisher":{"@id":"https:\/\/www.couchbase.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/exploring-couchbase-and-n1ql-through-touchbase-using-node-js-and-angular-js-part-2-email-verification\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png","inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.couchbase.com\/blog\/exploring-couchbase-and-n1ql-through-touchbase-using-node-js-and-angular-js-part-2-email-verification\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.couchbase.com\/blog\/exploring-couchbase-and-n1ql-through-touchbase-using-node-js-and-angular-js-part-2-email-verification\/","url":"https:\/\/www.couchbase.com\/blog\/exploring-couchbase-and-n1ql-through-touchbase-using-node-js-and-angular-js-part-2-email-verification\/","name":"Email Verification with Nodemailer, Sendgrid & Couchbase","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/exploring-couchbase-and-n1ql-through-touchbase-using-node-js-and-angular-js-part-2-email-verification\/#primaryimage"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/exploring-couchbase-and-n1ql-through-touchbase-using-node-js-and-angular-js-part-2-email-verification\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png","datePublished":"2015-11-04T23:14:34+00:00","dateModified":"2019-05-07T17:09:40+00:00","breadcrumb":{"@id":"https:\/\/www.couchbase.com\/blog\/exploring-couchbase-and-n1ql-through-touchbase-using-node-js-and-angular-js-part-2-email-verification\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.couchbase.com\/blog\/exploring-couchbase-and-n1ql-through-touchbase-using-node-js-and-angular-js-part-2-email-verification\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.couchbase.com\/blog\/exploring-couchbase-and-n1ql-through-touchbase-using-node-js-and-angular-js-part-2-email-verification\/#primaryimage","url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png","contentUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png","width":1800,"height":630},{"@type":"BreadcrumbList","@id":"https:\/\/www.couchbase.com\/blog\/exploring-couchbase-and-n1ql-through-touchbase-using-node-js-and-angular-js-part-2-email-verification\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.couchbase.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Exploring Couchbase and N1QL through Touchbase using Node.js and Angular.js \u2013 Part 2: Email Verification with Nodemailer, Sendgrid and Couchbase"}]},{"@type":"WebSite","@id":"https:\/\/www.couchbase.com\/blog\/#website","url":"https:\/\/www.couchbase.com\/blog\/","name":"The Couchbase Blog","description":"Couchbase, the NoSQL Database","publisher":{"@id":"https:\/\/www.couchbase.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.couchbase.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.couchbase.com\/blog\/#organization","name":"The Couchbase Blog","url":"https:\/\/www.couchbase.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png","contentUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png","width":218,"height":34,"caption":"The Couchbase Blog"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/454261061bad5159ad2696e0bf162eaa","name":"Pranav Mayuram","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/de8b1b457fdc2f5f8b407ef8bf0bfcacb1e2be0ab9de2cee8e8aa4ee7f985709?s=96&d=mm&r=g61baa4ff0f18aa9a8ce672f0f97f1ac0","url":"https:\/\/secure.gravatar.com\/avatar\/de8b1b457fdc2f5f8b407ef8bf0bfcacb1e2be0ab9de2cee8e8aa4ee7f985709?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/de8b1b457fdc2f5f8b407ef8bf0bfcacb1e2be0ab9de2cee8e8aa4ee7f985709?s=96&d=mm&r=g","caption":"Pranav Mayuram"},"description":"Pranav Mayuram is a N1QL Query language intern, Couchbase. Built a social network platform, Touchbase, using Couchbase Server, Node.js, Express &amp; Angular.js.","url":"https:\/\/www.couchbase.com\/blog\/author\/pranav-mayuram\/"}]}},"acf":[],"authors":[{"term_id":9034,"user_id":60,"is_guest":0,"slug":"pranav-mayuram","display_name":"Pranav Mayuram","avatar_url":"https:\/\/secure.gravatar.com\/avatar\/de8b1b457fdc2f5f8b407ef8bf0bfcacb1e2be0ab9de2cee8e8aa4ee7f985709?s=96&d=mm&r=g","0":null,"1":"","2":"","3":"","4":"","5":"","6":"","7":"","8":""}],"_links":{"self":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/posts\/2001","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/users\/60"}],"replies":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/comments?post=2001"}],"version-history":[{"count":0,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/posts\/2001\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/media\/13873"}],"wp:attachment":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/media?parent=2001"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/categories?post=2001"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/tags?post=2001"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/ppma_author?post=2001"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}