K
Kevin F
Having some troubles downloading messages with POP3...
I can connect to the server just fine and list messages without any
problem with the following code:
------------------------
from poplib import *
server = POP3("mail.bluebottle.com")
print server.getwelcome()
print server.user("(e-mail address removed)")
print server.pass_("neurogasm")
messagesInfo = server.list()[1]
numMessages = len(messagesInfo)
print numMessages
------------------------
However, if I try to actually download the messages themselves, my
python editor highlights 'msgSize' and says "invalid syntax" when I run
the following subsequent lines of code:
------------------------
emails = []
for msg in messagesInfo:
msgNum = int(split(msg, " ")[0]
msgSize = int(split(msg, " ")[1]
if(msgSize < 20000):
messages = server.retr(msgNum)[1]
messages = join(message, "\n")
emails.append(message)
I can connect to the server just fine and list messages without any
problem with the following code:
------------------------
from poplib import *
server = POP3("mail.bluebottle.com")
print server.getwelcome()
print server.user("(e-mail address removed)")
print server.pass_("neurogasm")
messagesInfo = server.list()[1]
numMessages = len(messagesInfo)
print numMessages
------------------------
However, if I try to actually download the messages themselves, my
python editor highlights 'msgSize' and says "invalid syntax" when I run
the following subsequent lines of code:
------------------------
emails = []
for msg in messagesInfo:
msgNum = int(split(msg, " ")[0]
msgSize = int(split(msg, " ")[1]
if(msgSize < 20000):
messages = server.retr(msgNum)[1]
messages = join(message, "\n")
emails.append(message)