title: How to render a view to a string?
body: <p>I want to render a specific view in a sailsjs controller/action which should be sent out as email.</p>
  
  <p>I have the following sample action:</p>
  
  <pre><code>function registerAction(req, res) {
     // handle user registration
  
  
    // email user
    sendEmail({
        to: newUser.email,
        subject: "Welcome",
        text: /* VIEW RENDER HERE */
    });
  
    // render view to the user
    return res.view({
       user: newUser
    });
  }
  </code></pre>
  
  <p>How can I render a view-template with the tools sailsjs provides so that I don't need to hardcode an email text or use other libraries?</p>
  
  <p>Thanks in advance!</p>