Guest User

Untitled

a guest
Feb 20th, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.37 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.             fd = open(file_name, "w")
  8.             fd.write(email[1])
  9.             fd.close()
  10.         except Exception, err:
  11.             loggin.warning(err)
Add Comment
Please, Sign In to add comment