Guest User

Untitled

a guest
Feb 20th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.38 KB | None | 0 0
  1.     for email in mbox:
  2.         path = "./" + str(usr['id'])
  3.         try:
  4.             if not os.path.exists(path):
  5.                 os.mkdir(path)
  6.             file_name = path + '/' + str(uuid.uuid1()) + '.eml'
  7.             with open(file_name, "w") as fd:
  8.                 fd.write(email[1])
  9.                 fd.close()
  10.         except Exception, err:
  11.             loggin.warning(err)
Add Comment
Please, Sign In to add comment