title: Send Email to multiple recipients from .txt file with Python smtplib
body: <p>I try to send mails from python to multiple email-addresses, imported from a .txt file, I've tried differend syntaxes, but nothing would work...</p>
  
  <p>The code:</p>
  
  <pre><code>s.sendmail('sender@mail.com', ['recipient@mail.com', 'recipient2@mail.com', 'recipient3@mail.com'], msg.as_string())
  </code></pre>
  
  <p>So I tried this to import the recipient-addresses from a .txt file:</p>
  
  <pre><code>urlFile = open("mailList.txt", "r+")
  mailList = urlFile.read()
  s.sendmail('sender@mail.com', mailList, msg.as_string())
  </code></pre>
  
  <p>The mainList.txt contains: </p>
  
  <pre><code>['recipient@mail.com', 'recipient2@mail.com', 'recipient3@mail.com']
  </code></pre>
  
  <p>But it doesn't work...</p>
  
  <p>I've also tried to do:</p>
  
  <pre><code>... [mailList] ... in the code, and '...','...','...' in the .txt file, but also no effect
  </code></pre>
  
  <p>and</p>
  
  <pre><code>... [mailList] ... in the code, and ...','...','... in the .txt file, but also no effect...
  </code></pre>
  
  <p>Does anyone knows what to do?</p>
  
  <p>Thanks a lot!</p>