Today's Smalltalk Daily looks at retrieving email messages using POP3 from Cincom Smalltalk. The code I used in the screencast is below; to skip to the video, click here.
"login, get message list"
user := NetUser username: user password: password.
client := POP3Client host: 'pop.gmail.com'.
client user: user.
client useSecureConnection.
client
connect;
login.
list := client list.
"get the messages"
msgs := list collect: [:each | | num message |
num := each messages.
id := client retrieveMessageID: num.
message := client retrieveMessage: num.
id -> message].
"delete from server"
client deleteMessageIds: (msgs collect: [:each | each key]).
"disconnect"
client disconnect.
To watch now, use the viewer below:
If you have trouble viewing that directly, you can click here to download the video directly. If you need the video in a Windows Media format, then download that here.
You can also watch it on YouTube:
Technorati Tags:
smalltalk, email, pop3