Solved

Email contacts grabber library?

Posted on 2010-08-20
3
470 Views
Last Modified: 2012-06-21
Hi,

Do you know of any email contacts grabber library in Python?
i.e. The user supplies the username and password of gmail to a site, and the site using a library logons to gmail and parses the contact list and extract the emails so that the user can send invites using the gmail contacts.

Thanks
Jamie

0
Comment
Question by:jamie_lynn
  • 2
3 Comments
 
LVL 1

Accepted Solution

by:
number1pride earned 500 total points
ID: 33526948
This library should do it:
http://libgmail.sourceforge.net/

If that does not do it there are many other options here:
http://code.google.com/hosting/
0
 

Author Comment

by:jamie_lynn
ID: 33527205
Hi number1pride,

I was hoping for a library that does all the major emails.
Similar to this, but this library doesn't have python
http://www.rocketdownload.com/scripts/program/yahoo--gmail--hotmail-and-aol-contact-grabber-11523.html

Thanks
Jamie
0
 
LVL 1

Assisted Solution

by:number1pride
number1pride earned 500 total points
ID: 33548312
Jamie,

You should be able to use the imap library for this, at least for gmail and yahoo.  For hotmail is a little more complicated and not sure if you can use imap for aol.

So i think this should give you a start "imaplib'

Here is an example for gmail:


import imaplib

usr="user@gmail.com"
pwd="yourpassword"

gmail = imaplib.IMAP4_SSL('imap.gmail.com', 993)
gmail.login(usr,pwd)

status, count = gmail.select('Inbox')
print status
status, data = gmail.fetch(count[0], '(UID BODY[TEXT])')

print data[0][1]
gmail.close()
gmail.logout()

Open in new window

0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

"The time has come," the Walrus said, "To talk of many things: Of sets--and lists--and dictionaries-- Of variable kinks-- And why you see it changing not-- And why so strange are strings." This part describes how variables and references (see …
Strings in Python are the set of characters that, once defined, cannot be changed by any other method like replace. Even if we use the replace method it still does not modify the original string that we use, but just copies the string and then modif…
Learn the basics of lists in Python. Lists, as their name suggests, are a means for ordering and storing values. : Lists are declared using brackets; for example: t = [1, 2, 3]: Lists may contain a mix of data types; for example: t = ['string', 1, T…
Learn the basics of if, else, and elif statements in Python 2.7. Use "if" statements to test a specified condition.: The structure of an if statement is as follows: (CODE) Use "else" statements to allow the execution of an alternative, if the …

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question