Solved

Email contacts grabber library?

Posted on 2010-08-20
3
472 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

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 …
A set of related code is known to be a Module, it helps us to organize our code logically which is much easier for us to understand and use it. Module is an object with arbitrarily named attributes which can be used in binding and referencing. …
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 modules and packages in Python. Every Python file is a module, ending in the suffix: .py: Modules are a collection of functions and variables.: Packages are a collection of modules.: Module functions and variables are accessed us…

762 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