code: def msgconvert(email):
      
      log.debug("Started converting Outlook email")
      temph, temp = tempfile.mkstemp(prefix="outlook_")
      command = ["msgconvert", "--outfile", temp, email]
  
      try:
          if six.PY2:
              with open(os.devnull, "w") as devnull:
                  out = subprocess.Popen(
                      command, stdin=subprocess.PIPE,
                      stdout=subprocess.PIPE, stderr=devnull)
          elif six.PY3:
              out = subprocess.Popen(
                  command, stdin=subprocess.PIPE,
                  stdout=subprocess.PIPE, stderr=subprocess.DEVNULL)
  
      except OSError:
          message = "To use this function you must install 'msgconvert' tool"
          log.exception(message)
          raise MailParserOSError(message)
  
      else:
          stdoutdata, _ = out.communicate()
          return temp, stdoutdata.decode("utf-8").strip()
  
      finally:
          os.close(temph)
docs: Exec msgconvert tool, to convert msg Outlook
      mail in eml mail format
  
      Args:
          email (string): file path of Outlook msg mail
  
      Returns:
          tuple with file path of mail converted and
          standard output data (unicode Python 2, str Python 3)