help-smalltalk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-smalltalk] POP and SMTP assistance


From: Stephen
Subject: Re: [Help-smalltalk] POP and SMTP assistance
Date: Sat, 08 Sep 2007 14:55:32 +1200
User-agent: Thunderbird 2.0.0.6 (Macintosh/20070728)

Hi Paolo,

I can't get the test smtp script to run. I have checked that a class method exits on MimeEntity called readFrom (in MIME.st). Would you be able to see what is wrong with the code below.

Thank you

Here's what happens when I run it...
--------
[ projects_smalltalk]$ gst -i  smtp1.st
"Global garbage collection... done"
Loading package TCP
Loading package SUnit
Loading package NetClients
Recompiling classes...
Object: nil error: did not understand #readFrom:
MessageNotUnderstood(Exception)>>#signal
UndefinedObject(Object)>>#doesNotUnderstand:
UndefinedObject>>#executeStatements

----------

And here is the script

address@hidden projects_smalltalk]# cat smtp1.st
    "NetClients.SMTP.SMTPClient exampleHost: 'localhost'."
    "user := 'address@hidden' bindWithArguments: { Smalltalk getenv: 'USER'.
       IPAddress localHostName }."

PackageLoader fileInPackages: #('NetClients')!
Smalltalk addSubspace: #NetClients!

    | user message client host |

    user := 'address@hidden'.
    host := 'mailsvr.fqdn'.
    message := MimeEntity readFrom:
('From: ', user, '
To: ', user, '
Subject: Test mail from Smalltalk (SMTPClient)

This is a test mail from Smalltalk (SMTPClient).
') readStream.

    client := NetClients.SMTP.SMTPClient connectToHost: host.
    [client sendMessage: message]
        ensure: [client close].!







reply via email to

[Prev in Thread] Current Thread [Next in Thread]