title: how to read my json and send it to an email in pure nodejs
body: <p>I would like NodeJS server, <code>post.js</code> file, to send the json object from the AJAX request to an email using only pure NodeJS.
  The following is the front-end code that sends the AJAX request:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>$(document).ready(function() {
  
  
      $("#contact").submit(function () {
          var data = {};
          $.each($(this).serializeArray(), function (key, value) {
              data[value.name] = value.value;
          });
          data.interest = [data.interest1, data.interest2, data.interest3];
          delete data.interest1;
          delete data.interest2;
          delete data.interest3;
          console.log(data);
          $.ajax({
              type: "POST",
              data: JSON.stringify(data),
              dataType: 'json',
              url: "post.js",
              success: function (data) {
                  $("#contact").addClass('success');
              },
              error: function () {
                  $("#contact").addClass('error');
              }
          });
          return false;
      });
  });</code></pre>
  </div>
  </div>
  </p>