title: Sending email containing accent with powershell
body: <p>I'm trying to send emails containing accents via powershell.</p>
  
  <p>If i do the following :</p>
  
  <pre><code>$enc = [System.Text.Encoding]::UTF8
  Send-MailMessage -to "Recipient@company.com" -from "Sender@company.com" -subject "test" -body "éèà" -Encoding $enc
  </code></pre>
  
  <p>It actually works and i get the accents fine in the mail.</p>
  
  <p>BUT, if i do this :</p>
  
  <pre><code>$enc = [System.Text.Encoding]::UTF8
  
  $Body = @"
  
  éèà
  
  "@
  
  Send-MailMessage -to "Recipient@company.com" -from "Sender@company.com" -subject "test" -body $body -Encoding $enc
  </code></pre>
  
  <p>The email looks like this : Ã©Ã¨Ã</p>
  
  <p>I actually need to use the @" "@ quotes to send multiple lines mails. </p>
  
  <p>Does anybody have a clue of how i could make this work ?</p>
  
  <p>Thanks for your help !</p>