"senders" is list, that is why that regex does not work. I don't like regexes that much so you can try this:parsed_senders = []sender = ""for item in senders: if isinstance(item,tuple):
item= ''.join(item) if item==')': parsed_senders.append(sender[sender.find('From:')+5:].strip())
Marco Carvalho wrote:
> On 3/24/06, Sebastjan Trepca <[EMAIL PROTECTED]> wrote:
>
>> m.select('myfolder')
>
> Some attention is required here to retrieve subfolders.
> Some imap servers like Cyrus and Courier uses "INBOX.subfolder" to
> access subfolders.
> --
> Marco Carvalho (macs) | marcoacarv
On 3/24/06, Sebastjan Trepca <[EMAIL PROTECTED]> wrote:
> m.select('myfolder')
Some attention is required here to retrieve subfolders.
Some imap servers like Cyrus and Courier uses "INBOX.subfolder" to
access subfolders.
--
Marco Carvalho (macs) | marcoacarvalho(a)gmail.com
http://arrakis.no-ip.i
Sebastjan Trepca wrote:
> A very simple example...
>
> import imaplib
> m = imap.IMAP4()
> m.login(username,password)
> m.select('myfolder')
> status, data = m.search(None,'(SUBJECT "BIKES")')
> assert status=='OK', "Error. Message: %s"%data
> data = data[0] #you get your results in a list and sea
A very simple example...
import imaplib
m = imap.IMAP4()
m.login(username,password)
m.select('myfolder')
status, data = m.search(None,'(SUBJECT "BIKES")')
assert status=='OK', "Error. Message: %s"%data
data = data[0] #you get your results in a list and search returns only
one result
assert data,"N
Okay So I got the 'search' part to work, which outputs me a long list of
message numbers. how do i use that list of message numbers to fetch the
'from' address for each one and send them a confirmation email?
is this some sort for loop?
any help would be greatly appreciated.
cheers.
Kun wrot
Hey guys, I would like to have a code in python (as simple as possible)
to scan a specific folder in my mailbox and if the subject is equal to,
say, 'BIKES', I would like to have the code automatically send the
SENDER an email saying something like "We have received your Email".
Furthermore, I