title: Trouble sending email using Powershell
body: <p>I've run the following script:</p>
  
  <blockquote>
    <p><code>PS C:\&gt; Send-MailMessage -To &lt;EmailAddress1&gt; -From &lt;EmailAddress2&gt; -Body "This is a test" -Subject "TEST MAIL" -SmtpServer &lt;INTERNAL IP OF SMTP SERVER&gt;</code></p>
  </blockquote>
  
  <p>And I receive the following error:</p>
  
  <blockquote>
    <p><code>Send-MailMessage : Unable to read data from the transport connection: net_io_connectionclosed.</code></p>
  </blockquote>
  
  <pre><code>At line:1 char:17
  + Send-MailMessage &lt;&lt;&lt;&lt;  -To &lt;EmailAddress1&gt; -From &lt;EmailAddress2&gt; -Body "This is a test" -Subject "TEST MAIL" -SmtpServer &lt;INTERNAL IP OF SMTP SERVER&gt;
  + CategoryInfo: InvalidOperation: (System.Net.Mail.SmtpClient:SmtpClient) [Send-Mail Message], SmtpException
  + FullyQualifiedErrorId : SmtpException,Microsoft.PowerShell.Commands.SendMailMessage`
  </code></pre>
  
  <p>I was made aware of the fact that I need permissions to send email from my local machine through the SMTP server, and as far as I know, I've been granted those rights.</p>
  
  <p>Would somebody please help point me in the right direction on this one?</p>
  
  <p>The ultimate goal is to be able to send emails as part of some Powershell scripts.</p>
  
  <p>Thanks!</p>