title: Python - Sending Emails Not Working
body: <p>So i have a list of emails that i want to send a message to. When i run the code, i don't get any errors but the emails never go through/ here is the code (I already have all of the necessary imports)</p>
  
  <pre><code>def notifyUsers():
      users = session.query(Users).all()
  
      From = 'status@travellrs.com'
      Subject = "Travellr - Feedback"
      Contents = '''
           If you are experiencing issues with Travellr, please email - ryanwaite28@gmail.com
  
      Thank You For Using Travellr!
  
      '''
  
      try:
          server = smtplib.SMTP('domain:port')
          server.starttls()
          server.login('login', 'password')
  
          for u in users:
              print (u.email)
              message = """\
              From: %s
              To: %s
              Subject: %s
  
              %s
              """ % \
              (From, ", ".join([u.email]), Subject, Contents)
  
              server.sendmail(From, [u.email], message)
  
          server.quit()
          print ('Emails Sent.')
  
      except Exception:
          print ('Error...')
  </code></pre>