Thanks Andreas,

That worked, although I'm obviously missing something you have in your image, since SecureSocketStream doesn't implement openConnectionToHost:port:timeout:, only openConnectionToHost:port:. I just removed the timeout argument altogether, using the default timeout, and it works fine with that.

I tried the POP3Client, but gmail requires an SSL connection, so I copied your ensureConnection method to a new subclass, SecurePOP3Client (see attached) that works nicely.

Note that the example attempts to delete the message after downloading, which of course is nice to have in an automated system, but you probably wouldn't want to do it on your "real" gmail account. In order for the delete to work, you have to change the setting on the gmail account settings to delete after download. I also had to add a #quit in addition to the #close in order to have the server flush and properly do the delete.

- Jon


On Sun, Nov 27, 2011 at 5:42 AM, Andreas Raab <andreas.raab@gmx.de> wrote:
On 11/26/2011 17:55, Jon Hylands wrote:
This clearly doesn't work on Windows at all, since TestCase >>
#shouldPass sends #includes: to the result of that method, which (if
you're not running Mac OS) is the SqueakSSLTest instance.

You're right, apologies. I don't know what I've been smoking when I committed this version :-) It's fixed now.


I'm hoping to be able to send & receive email from a specific gmail
account using this - any suggestions?

For sending you can try the SqueakSSL-SMTP package which i just committed to the SqueakSSL repository. This is just a subclassed SMTPClient using SecureSocketStream for sending the email. The class side example shows how to send Email from a GMail account.

POP3 should be similarly simple if you start from POP3Client.

Hope this helps,
 - Andreas