title: Using sendmail from bash script for multiple recipients
body: <p>I'm running a bash script in cron to send mail to multiple recipients when a certain condition is met.</p>
  <p>I've coded the variables like this:</p>
  <pre><code>subject=&quot;Subject&quot;
  from=&quot;user@example.com&quot;
  recipients=&quot;user1@mail.example user2@mail.example&quot;
  mail=&quot;subject:$subject\nfrom:$from\nExample Message&quot;
  </code></pre>
  <p>And the actual sending:</p>
  <pre><code>echo -e $mail | /usr/sbin/sendmail &quot;$recipients&quot;
  </code></pre>
  <p>The problem is that only <code>user2@mail.example</code> is receiving the email. How can I change this so all the recipients receive the email?</p>
  <p>NOTE: The solution has to be with sendmail, I'm using jailshell and it seems to be the only available method</p>