'From Squeak3.6beta of ''4 July 2003'' [latest update: #5331] on 6 July 2003 at 7:33:25 am'! "Change Set: ObsoleteNetClassesFix-nk Date: 6 July 2003 Author: Ned Konz In 3.6b-5331, there were still some references to obsolete classes. This removes those references. "! !HTTPSocket class methodsFor: 'proxy settings' stamp: 'nk 7/6/2003 07:30'! httpProxyPort "Answer the name of my HTTP proxy server port, or nil." ^HTTPProxyPort! ! !HTTPSocket class methodsFor: 'proxy settings' stamp: 'nk 7/6/2003 07:30'! httpProxyServer "Answer the name of my HTTP proxy server, or nil." ^HTTPProxyServer! ! !MailMessage methodsFor: 'printing/formatting' stamp: 'nk 7/6/2003 07:18'! bodyTextFormatted "Answer a version of the text in my body suitable for display. This will parse multipart forms, decode HTML, and other such things" "check for multipart" self body isMultipart ifTrue: [ "check for alternative forms" self body isMultipartAlternative ifTrue: [ "it's multipart/alternative. search for a part that we can display, biasing towards nicer formats" #('text/html' 'text/plain') do: [ :format | self parts do: [ :part | part body contentType = format ifTrue: [ ^part bodyTextFormatted ] ] ]. "couldn't find a desirable part to display; just display the first part" ^self parts first bodyTextFormatted ]. "not alternative parts. put something for each part" ^Text streamContents: [ :str | self parts do: [ :part | ((#('text' 'multipart') includes: part body mainType) or: [ part body contentType = 'message/rfc822']) ifTrue: [ "try to inline the message part" str nextPutAll: part bodyTextFormatted. ] ifFalse: [ |descript | str cr. descript := part name ifNil: [ 'attachment' ]. str nextPutAll: (Text string: '[', descript, ']' attribute: (TextMessageLink message: part)). ] ] ]. ]. "check for HTML" (self body contentType = 'text/html') ifTrue: [ Smalltalk at: #HtmlParser ifPresentAndInMemory: [ :htmlParser | ^(htmlParser parse: (ReadStream on: body content)) formattedText ] ]. "check for an embedded message" self body contentType = 'message/rfc822' ifTrue: [ ^(MailMessage from: self body content) formattedText ]. "nothing special--just return the text" ^body content. ! ! !SMObject methodsFor: 'mail' stamp: 'nk 7/6/2003 07:21'! mailRandomPasswordToRegistratorWithLink: aLink "Change the password to a random generated one and mail it to the registrator." | randomPass | randomPass _ String streamContents: [:stream | 10 timesRepeat: [ stream nextPut: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789' atRandom]]. self setNewPassword: randomPass. SMTPClient deliverMailFrom: 'goran.hultgren@bluefish.se' to: {self registratorEmail} text: 'From: SqueakMap To: ', self registratorEmail, ' Subject: New password at SqueakMap!! Hi!! An extra random password has been added for updating the registration of "', name, '": "', randomPass, '" The regular password still works, so if it was not you who requested this extra random password you can safely just delete this email. You can edit the registration for ', name, ' at ', aLink, '. This extra password will stop working when you change your regular password. ', (self randomPhrase), ', SqueakMap' usingServer: 'leia.bluefish.se'! ! !SocksSocket class methodsFor: 'accessing' stamp: 'nk 7/6/2003 07:30'! defaultSocksHostAddress ^NetNameResolver addressForName: HTTPSocket httpProxyServer! ! !SocksSocket class methodsFor: 'accessing' stamp: 'nk 7/6/2003 07:30'! defaultSocksPort ^HTTPSocket httpProxyPort! !