python imaplib gmail fetching multiple results from list
<p>I am trying to obtain email ids and then fetch all of them. How do I do this? Thanks!</p>

<p>The following is my code:</p>

<pre><code>import imaplib
import re

user = 'user'
pwd = 'password'
imap_server = imaplib.IMAP4_SSL('imap.gmail.com', 993)
imap_server.login(user, pwd)
imap_server.select('Inbox')
typ, response = imap_server.search(None, '(SUBJECT "Hello")')
response = str(response[0])
response_re = re.compile('\d+')
response_pat = re.findall(response_re, response)

for i in response_pat:
    results, datas = imap_server.fetch(i, "(RFC822)")
</code></pre>

<p>for i in datas:</p>

<pre><code>print i
</code></pre>

<h1>this still on print one value of datas, when I have iterated through a list of multiple #values.</h1>
