title: mailto: pull email address from item
body: <p>I am looking to have an email to send that will populate the e-mail address, Subject and Body of the e-mail. I tried the following but it will not work. Can someone assist?</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;script src="/SiteAssets/jquery-3.4.0.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript"&gt;
    function SendMail()
    {
     var emailID = getEmailFromPeoplePicker('User Requesting Assistance');
     var subject = getSubject('Ticket Number');
     var body = getBody('Description of Problem');
     location.href = "mailto:"+emailID+"?subject="+subject+"&amp;body="+body;
    }
    function getSubject(subject)
    {
     return $('input[title="'+subject+'"]').val();
    }
    function getBody(body)
    {
     return $('input[title="'+body+'"]').val();
    }
    function getEmailFromPeoplePicker(title) {
     //Get the people picker field
     var ppDiv = $("div[title='" + title + "']")[0];
     //cast the object as type PeoplePicker
     var peoplePicker = SPClientPeoplePicker.SPClientPeoplePickerDict[ppDiv.id];
     //Get list of users from field (assuming 1 in this case)
     var userList = peoplePicker.GetAllUserInfo();
     var userInfo = userList[0];
     var userEmail;
     //The description field contains the login info without the lookup extras.  In new forms this 
     //field can be undefined depending on the field being checked.  Only check if userInfo is
     //initialized.
     if(userInfo != null)
     {
      userEmail = userInfo.EntityData.Email;
     }
     return userEmail;
    }
  &lt;/script&gt;
  &lt;a href="#" onclick="SendMail()"&gt;Email User&lt;/a&gt;</code></pre>
  </div>
  </div>
  </p>