NAME
GetEmailUsingPop3 — Log onto server with POP3, get messages, close connection.
SYNOPSIS
GetEmailUsingPop3 ServerAddress Username Password ?DeleteMode?
DESCRIPTION
Return Value
Dict containing email messages.
Arguments
ServerAddressAddress of email server to check for email.
UsernameAccount username (quite possibly same as the email address
PasswordPassword for the account.
DeleteModeOptional. Set this to "DeleteAll" to make it delete all the emails that it receives from the server. Defaults to "DeleteNone".
More Info
This command will return to you a dict. At the top level, there will be a key per message number (starting from 1). Subsequent keys are: From, To, Subject, Date, and Body. See Examples for details.

If you want to know how many email messages you have in the dict, you can use [dict size $MyEmailDict].

Note that POP3 does not have support for read / unread messages. Your alternatives are to download each time and use something within the messages to see that they are new -OR- delete all messages every time you download. There is no known way that you would lose your messages from the command itself due to error because it will always wait until it has completely downloaded and parsed all messages before sending the delete command.

Note that this command will not try to process or recover from any errors thrown from the pop3 or mime packages. If you do get an error, double check that you are using the correct values for your arguments.


For information regarding exceptions / errors, see here.
EXAMPLES
% SendEmail receiver@email-server.com test1 {test 1-2-3}
% SendEmail receiver@email-server.com test2 {test 4-5-6}
% SendEmail receiver@email-server.com test3 {test 7-8-9}
% set MyEmail [GetEmailUsingPop3 email-server.com receiver@email-server.com ThePassword]
% dict for {Key Message} $MyEmail { dict for {Key Value} $Message {puts "$Key: $Value"} }
From: sender@email-server.com
To: receiver@email-server.com
Subject: test1
Date: Sat Jan 01 00:00:00 EST 2000
Body: test 1-2-3

From: sender@email-server.com
To: receiver@email-server.com
Subject: test2
Date: Sat Jan 01 00:00:10 EST 2000
Body: test 4-5-6

From: sender@email-server.com
To: receiver@email-server.com
Subject: test3
Date: Sat Jan 01 00:00:20 EST 2000
Body: test 7-8-9
SEE ALSO
GetEmailUsingImap4, SendEmail
KEYWORDS
email, network