Send to Printer


Smalltalk Daily 09/16/10: Retrieving Email with Smalltalk

September 16, 2010 7:48:20.773

Today's Smalltalk Daily looks at retrieving email messages with POP3 from Cincom Smalltalk. The code used is below; to skip to the video, click here.

"login, get message list"
user := NetUser username: user password: password.
client := POP3Client host: ''.
client user: user.
client useSecureConnection.
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]).

client disconnect.

If you can't see the embedded video directly, you can go directly to YouTube for it. To watch now, click on the viewer below:

You can follow the Smalltalk channel on YouTube for all the "Smalltalk Daily" videos. You can also check out the videos on Vimeo, where the quality is higher, or over on Facebook, if you are a member.

You can download the video directly here. If you need the video in a Windows Media format, then download that here. If you like this kind of video, why not subscribe to "Smalltalk Daily"?

Technorati Tags: , ,

posted by James Robertson

 Share Tweet This