The following methods are used to log into a POP3 account.
- p.pass_(password): Sends a password password to the server. The server then replies with a response ('+OK' or '-ERR'). If the login is successful, the response will also include the number of messages in the mailbox and the mailbox's size in bytes.
- p.user(username): Used to specify a username username for logging into the server. If this is not used, the default is to use the name associated with the calling process or user.
NB: When using POP3, remember that the mailbox is locked until you call quits by sending 'Quit' (see
p.quit() under 'Managing a POP3 Mailbox'). This obviously prohibits other mail from being delivered. Rather it queues up on a server somewhere. Best practice is to login, pull down all the messages, and quit - leaving the box locked for as little time as possible.