Solved

Email contacts grabber library?

Posted on 2010-08-20
3
467 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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

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. …
Dictionaries contain key:value pairs. Which means a collection of tuples with an attribute name and an assigned value to it. The semicolon present in between each key and values and attribute with values are delimited with a comma.  In python we can…
Learn the basics of strings in Python: declaration, operations, indices, and slicing. Strings are declared with quotations; for example: s = "string": Strings are immutable.: Strings may be concatenated or multiplied using the addition and multiplic…
Learn the basics of while and for loops in Python.  while loops are used for testing while, or until, a condition is met: The structure of a while loop is as follows:     while <condition>:         do something         repeate: The break statement m…

708 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now