title: Python send mail inside docker container with local SMTP server
body: <p>I want to send mail with <code>smtp</code> lib on python. I understand that it uses local smtp service on port number 25. I have below codes. These codes run on my local without any problem and mail sends successfully. But when I  move them to docker container, mail is not sent and it doesn't give any error.</p>
  <p>My codes:</p>
  <pre><code>from_mail = 'noreply@testmail.com'
  to_mail = 'to@testmail.com'
  
  s = smtplib.SMTP('localhost')
  subject = 'Test Subject'
  content = 'content test'
  
  message = f&quot;&quot;&quot;\
        Subject: {subject}
        To: {to_mail}
        From: {from_mail}
        {content}&quot;&quot;&quot;
  result = s.sendmail(from_mail, to_mail, message)
  s.quit()
  </code></pre>
  <p>After running these codes, I get empty dict ({}) as <code>result</code> value. In the sendmail method description has this:</p>
  <blockquote>
  <p>... the message was accepted for delivery to three
  of the four addresses, and one was rejected, with the error code
  550.  If all addresses are accepted, then the method will return an
  empty dictionary.</p>
  </blockquote>
  <p>Is it about network configuration? Should I configure any network settings?</p>