Google Groups Home
Help | Sign in
Почта-2
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  1 message - Collapse all
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
Victor Metelitsa  
View profile
 More options Nov 21 2005, 2:26 am
Newsgroups: fido7.ru.smalltalk
From: Victor Metelitsa <v...@cssc.tat.ru>
Date: Mon, 21 Nov 2005 07:26:11 +0000 (UTC)
Local: Mon, Nov 21 2005 2:26 am
Subject: Почта-2
Теперь перейдём к POP3.

popClient := Pop3Client host: 'xxx'.
popClient user: (NetUser username: 'xxx' password: 'xxx').
self halt.
popClient
        connect;
        login.
message := popClient retrieveMessage: 1.
mimeMsg := MailMessage readFrom: message readStream.
popClient disconnect.

Это вновь не работает из-за проблем с кодировками.

NetPop3Client>>connect
        | socket |
        self state: Pop3AuthorizationState new.
        (socket := self createSocket) isNil ifTrue: [^NetClientError
signalWith: #connection].
        connection := ExternalConnection new.
        connection input: socket; output: socket.
        stream := connection readAppendStream.
        stream lineEndTransparent.
        self waitForResponse

ExternalConnection>>readAppendStream
        ^(self withEncoding: #default) readAppendStream

Это надо заменить на

NetPop3Client>>connect
        | socket |
        self state: Pop3AuthorizationState new.
        (socket := self createSocket) isNil ifTrue: [^NetClientError
signalWith: #connection].
        connection := ExternalConnection new.
        connection input: socket; output: socket.
        stream := connection readAppendStream_iso8859_1.
        stream lineEndTransparent.
        self waitForResponse

ExternalConnection>>readAppendStream_iso8859_1
        "Answer a readAppendStream on the receiver."

        ^(self withEncoding: #'iso8859-1') readAppendStream

--
Отправлено через сервер Форумы@mail.ru - http://talk.mail.ru


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google