title: How do i get fieldvalues in the Body of a javascript generated email
body: <p>i can produce an email with javascript and smtp.js.</p>
  <p>I would however like to add fieldvalues from the form into the body and cannot find the right syntax.</p>
  <p>there is an inputfield for email and a field for a number,
  i tried :
  var email=Form.email.value;
  var body = &quot; Well that was easy!! &quot;+email;</p>
  <p>Subject: &quot;Sending Email using javascript&quot;,
  Body: &quot;here i would like to add fieldvalues&quot;,
  })</p>
  <p>Can anyone please give a hint, i do not use javascript very often.
  Seems i will have to start learning. . .</p>
  <p>Regards,
  Jan</p>
  <p>Here is the code i used:</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
    
  &lt;head&gt;
    &lt;title&gt;Send Mail&lt;/title&gt;
    &lt;script src=
      "https://smtpjs.com/v3/smtp.js"&gt;
    &lt;/script&gt;
    
    &lt;script type="text/javascript"&gt;
      function sendEmail() {
        Email.send({
          Host: "smtp.gmail.com",
          Username: "sender@email_address.com",
          Password: "Enter your password",
          To: 'receiver@email_address.com',
          From: "sender@email_address.com",
          Subject: "Sending Email using javascript",
          Body: "Well that was easy!!",
        })
          .then(function (message) {
            alert("mail sent successfully")
          });
      }
    &lt;/script&gt;
  &lt;/head&gt;
    
  &lt;body&gt;
    &lt;form method="post"&gt;
  &lt;!-- here i would like to enter an e-mail-address that i want to use in the e-mail that is sent --&gt;
      
      E-Mail: &lt;input class="input2" type="text" name="email"&gt;&lt;br&gt;
      
      &lt;input type="button" value="Send Email" 
          onclick="sendEmail()" /&gt;
    &lt;/form&gt;
  &lt;/body&gt;
    
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>