title: Creating email via CMD batch script, how to insert txt file contents to the body of email?
body: <p>I have this script to create an email from CMD script and insert <code>TO</code>, <code>SUBJECT</code> and <code>BODY</code> automatically.</p>
  
  <p>I have a few variables already: </p>
  
  <ul>
  <li><code>%USERNAME%</code></li>
  <li><code>%TICKETNO%</code></li>
  </ul>
  
  <p>It works, it creates a new email, puts the <code>TO</code> address, <code>SUBJECT</code> and <code>BODY</code> automatically. Variables work fine.</p>
  
  <p>Now I want to insert the body as a sort of variable (redirected input to the command from varying text documents)</p>
  
  <pre><code>cd "c:\program files\microsoft office\office14\" 
  start outlook.exe /c ipm.note /m "%USERNAME%@domain.com&amp;subject=Request %TICKETNO% Completed&amp;body=exampletext”
  </code></pre>
  
  <p>Whatever I tried I can’t make it insert after <code>&amp;body</code> input redirected from a text file. For now I'm just specifying the text document but I can't get the syntax right. I don't really know how to do it but I tried a bunch of things last night and just couldn't get it to work.</p>
  
  <p>Example (pardon my noobishness):</p>
  
  <pre><code>start outlook.exe /c ipm.note /m "%USERNAME%@domain.com&amp;subject=Request %TICKETNO% Completed&amp;body=” &lt;body.txt
  </code></pre>
  
  <p>How can I do this? Is it possible?</p>