title: Sending an email with powershell but some recipients don´t receive the mail
body: <p>I have trouble sending a PowerShell email to various recipients. Some of them get the email but some do not. I do not know why, but if I send an email manually they do get it, but if I do it with the following script, they don't.</p>
  <pre class="lang-bsh prettyprint-override"><code>$Email       = &quot;example1@ex.com.ar&quot;, &quot;example2@ex.com.ar&quot;, &quot;example3@ex.com.ar&quot;, &quot;example4@ex.com.ar&quot;
  $Internal    = &quot;example5@ex.com.ar&quot;, &quot;example6@ex.com.ar&quot;,
  $Subject     = &quot;Test - $(Get-Date -format dd/MM/yy)&quot;
  
  [array]$attachments = Get-ChildItem &quot;\\server\folder\destination&quot; *.pdf
  
  if ([array]$attachments -eq $null) {
  }
  
  else {
  
      $Msg = @{
          to          = $Email
          cc          = $Internal
          from        = &quot;anemail.mail@mailmail.com.ar&quot;
          Body        = 'x,','x.','x,','x'-join '&lt;br /&gt;'
          subject     = &quot;$Subject&quot;
          smtpserver  = &quot;example@example.com.ar&quot;
          BodyAsHtml  = $True
          Attachments = $attachments.fullname
      }
  
      Send-MailMessage @Msg
  }
  
  </code></pre>
  <p>I thought of an email array to solve this, but even if i test with only the email that do not receive the emails, but it does not work either.</p>