1. Home
  2. Computing & Technology
  3. Python

Retrieving POP3 Email with poplib

From Al Lukaszewski, for About.com

3 of 5

Setting Up the Login

With the mailbox object created, we then login with login user.

Mailbox.user(user)
Note that method user is used to specify a username for logging into the server. If the username is left off, the default is to use the name associated with the calling process or user - whether the local user or a suid user. Therefore, you should fail softly here (even though here we don't for the sake of brevity). For tips on managing exceptions and errors, see Python's built-in exceptions and warnings. For help on how to use them, see "Exceptions, Errors, and Warnings."

Before we can initiate the login process, however, we need to get the password.

Explore Python
About.com Special Features

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

Easy ways to connect two computers for networking purposes. More >

  1. Home
  2. Computing & Technology
  3. Python

©2009 About.com, a part of The New York Times Company.

All rights reserved.