title: Text array to email body
body: <p>I have a backup log file from robocopy and would like to take last lines from that file and send it as email body. 
  Log example:</p>
  
  <pre><code>            Total    Copied   Skipped  Mismatch    FAILED    Extras
   Dirs :     85262     85257         1         0         4         0
  Files :    637048    637047         0         0         1         0
  Bytes :1558.929 g1558.929 g         0         0       165         0
  Times :  19:30:49  19:01:06                       0:00:00   0:29:43
  
  Speed :            24448224 Bytes/sec.
  Speed :            1398.938 MegaBytes/min.
  
  Ended : Wed Sep 21 15:42:01 2011
  </code></pre>
  
  <p>Script code:</p>
  
  <pre><code>$report2_tail = Get-Content .\backup2.log )[-12 .. -1]
  $encoding = [System.Text.Encoding]::UTF8
  Send-mailmessage  -Smtpserver smtp.server.address -encoding $encoding -from "Backup-Replication&lt;backup@mm.com&gt;" -to "mm@mm.com" -subject "End of Replication Report" -body  "
  backup Replication Report
  ------------------------------------------------------------
  $report2_tail
  "
  </code></pre>
  
  <p>Script works fine but the message body is in one line and looks like this:</p>
  
  <pre><code>Total    Copied   Skipped  Mismatch    FAILED    Extras      Dirs :     85262     85257         1         0         4         0     Files :    637048    637047         0         0         1         0     Bytes :1558.929 g1558.929 g         0         0       165         0     Times :  19:30:49  19:01:06                       0:00:00   0:29:43      Speed :            24448224 Bytes/sec.     Speed :            1398.938 MegaBytes/min.      Ended : Wed Sep 21 15:42:01 2011
  </code></pre>
  
  <p>What is a best way to solve the problem ?
  Regards
  Marcin</p>