'From Squeak3.7alpha of ''11 September 2003'' [latest update: #5501] on 8 November 2003 at 9:26:36 pm'! !MailMessage methodsFor: 'initialize-release' stamp: 'nk 7/2/2003 12:29'! setFields: fieldName to: aCollectionOfFieldValues "Set a field to a field value or collection of values. If any fields of the specified name exists, they will be overwritten" fields at: fieldName asLowercase put: aCollectionOfFieldValues asOrderedCollection. text := nil.! ! !MailMessage methodsFor: 'access' stamp: 'bkv 11/4/2003 22:27'! date "Answer a date string for this message." ^ self dateStringFrom: self time! ! !MailMessage methodsFor: 'printing/formatting' stamp: 'bkv 6/23/2003 14:17'! regenerateBodyFromParts "regenerate the message body from the multiple parts" | bodyText | bodyText := String streamContents: [ :str | str cr. parts do: [ :part | str cr; nextPutAll: '--'; nextPutAll: self attachmentSeparator; cr; nextPutAll: part text ]. str cr; nextPutAll: '--'; nextPutAll: self attachmentSeparator; nextPutAll: '--'; cr ]. body := MIMEDocument contentType: 'multipart/mixed' content: bodyText. text := nil. "text needs to be reformatted"! ! !MailMessage methodsFor: '*bfav' stamp: 'bkv 11/4/2003 22:27'! dateStringFrom: numberOfSeconds "Answer a date string for an RFC 822 compliant time String." ^(Date fromSeconds: numberOfSeconds + (Date newDay: 1 year: 1980) asSeconds) printFormat: #(2 1 3 47 1 2)! !