title: 554, b'Transaction failed: Nested group in sending email using Amazon Aws SES
body: <p>I want to send email from my Ubuntu server thru Amazon AWS SES. I've a working code and it's able to send an email.</p>
  <p>However when I wrap the working code within a function it's giving this error:</p>
  <pre><code>Something with SMTP went wrong...
  (554, b'Transaction failed: Nested group')
  </code></pre>
  <p>I'm attaching visual code comparison, .. I'm curious as to what could be wrong.</p>
  <p><a href="https://i.stack.imgur.com/R2WSC.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/R2WSC.jpg" alt="enter image description here" /></a></p>