code: def is_bad_headers(self):
          
  
          headers = [self.subject, self.sender]
          headers += list(self.send_to)
          headers += dict(self.extra_headers).values()
  
          for val in headers:
              for c in '\r\n':
                  if c in val:
                      return True
          return False
docs: Checks for bad headers i.e. newlines in subject, sender or recipients.