SMTPClient and SSL

Richard Eng richard.eng at rogers.com
Thu Dec 13 00:21:32 UTC 2007


I have a question about SMTPClient:

Can it negotiate with a SSL-enabled web server, such as Gmail?

Here's my situation:

Case #1:

client := SMTPClient openOnHostNamed: 'smtp.broadband.rogers.com' port: 25.
client user: 'myusername at rogers.com'; password: 'mypassword';
    login;
    initiateSession.
client mailFrom: 'admin at mydomain.com';
    recipient: 'targetuser at hotmail.com';
    data: 'Subject: This is a test
From: admin at mydomain.com
To: targetuser at hotmail.com

Hi.
Bye.
Richard'.
client quit.

The above works perfectly. No problemo.


Case #2:

client := SMTPClient openOnHostNamed: 'smtp.gmail.com' port: 995.
client user: 'myusername at gmail.com'; password: 'mypassword';
    login;
    initiateSession.
client mailFrom: 'admin at mydomain.com';
    recipient: 'targetuser at hotmail.com';
    data: 'Subject: This is a test
From: admin at mydomain.com
To: targetuser at hotmail.com

Hi.
Bye.
Richard'.
client quit.

The above doesn't work--Squeak times out and throws up the debug window to
say as much.

Now, the *only* difference I can discern between smtp.broadband.rogers.com
(port 25) and smtp.gmail.com (port 995) is that the latter is SSL-enabled.
Hence, my original question.

For what *other* reason might Gmail not be able to connect with SMTPClient?

Thanks in advance.

Regards,
Richard





More information about the Squeak-dev mailing list