gmail script
#1
Thumbs Down 
if you read my last post (upgrade to python 2.4) you would know i'm working on a gmail script. since i can't find an easy way to use poplib and ssl (gmail uses ssl over pop3) i decided to make a html version.

everything was going good until i ran into a brick wall. a way of identifing one message from the other.

i use the gmail search feature to find specific mail (so you could open a specific mail) but i can't think of a search parameter that is unquie to every email.

i tried by message id, but gmail dosen't let you search by message id. i tried by subject, but it is possible (i would say 70% chance) that more then one email has the same subject.

the way it works now, if more then one email has the same subject (we will say 3 for arguments sake) it reads the last one.

the only thing i could think of is load every email into a buffer then make a unquie identifer myself, but that would take forever and probably crash more times then not.

any ideas?

edit//

i just had an idea. the basic html version of gmail uses the message id in the link to the email. ie one of the links to one of my emails is;
Quote:http://mail.google.com/mail/h/afdo760qprzv/?th=108f8fb46411f31f&v=c
the problem is the string between /h/ and /?th seems to chance by account (a different gmail account i have has the string "dby71e7wwgpm") if there was a way i could "guess" what the string was this way would work. or i could just rewrite this thing from the ground up using the gmail basic html page and parse the data..hmmmmm....

anyone have a need for a script that just shows all the mail you have waiting and which ones are new, but dosen't let you read it :hmm:



Reply
#2
i don't get it.. if you can scrape the html to get the messages why can't you scrape it to grab that string?
Reply
#3
get what string?

if you were referring to my edit then the problem is i didn't originally setup my script to use the gmail basic html page, its setup to use the standard page.

i would have to rewrite my whole script to use the basic html page and scrape that for the messages. it seems like that is my only route at this point tho.
Reply
#4
well the regular expressions will differ but the rest is probably at least similar... the basic version is likely more stable than the feature rich one anyway.
Reply

Logout Mark Read Team Forum Stats Members Help
gmail script0