Anyway! Back to the crux of the matter. I don't want to use the other programs, because really their just a crutch :/ . So far I've gotten it to retrieve my mailbox, get the emails, place them in a text file and read them. Here's what I want to happen (Mixed with my current code):
- Code: Select all
import getpass, poplib, sys, os, time
Mailbox = poplib.POP3_SSL("pop.email_provider.com", 995)
Mailbox.user("MY_EMAIL")
Mailbox.pass_("MY_PASS")
messageCount = len(Mailbox.list() [1])
for i in range(messageCount):
for j in Mailbox.retr(i+1) [1]:
ff = open('Mail.txt', 'a')
ff.write(j)
ff.close()
infile = open('Mail.txt', "r")
text = infile.read()
infile.close
search = "test"
index = text.find(search)
if text.content(search):
Do cool stuffz here
The "if text.content(search):" Part is pseudo code obv. Anywho, thats the wishful thinking part, the ability to say if "Mail.txt" has "search" in it, then do cool stuffz. But I can't code the if statment -.-
Help a noob pl0x
Thanks.




