I am getting the following response after executing the code shown below the response. How can I parse through this response to get the sender (John Smith) and the subject (test)?
[('13010 (BODY[HEADER.FIELDS (SUBJECT FROM)] {57}', 'From: John Smith <jsmith@gmail.com>\r\nSubject: test\r\n\r\n'), ')']
–
conn.fetch(message, '(BODY[HEADER.FIELDS (SUBJECT FROM)])')
Perhaps the question/answer here will help. Try something like this:
and then
msgshould be a dictionary.