"{ Package: 'stx:goodies/monticello' }"
MCWriteOnlyRepository subclass:#MCSmtpRepository
instanceVariableNames:'email'
classVariableNames:''
poolDictionaries:''
category:'Monticello-Repositories'
!
!MCSmtpRepository class methodsFor:'as yet unclassified'!
description
^ 'SMTP'
!
morphicConfigure
| address |
address _ FillInTheBlankMorph request: 'Email address:'.
^ address isEmpty ifFalse: [self new emailAddress: address]
! !
!MCSmtpRepository methodsFor:'as yet unclassified'!
basicStoreVersion: aVersion
MailSender sendMessage: (self messageForVersion: aVersion)
!
bodyForVersion: aVersion
^ String streamContents:
[ :s |
s nextPutAll: 'from version info:'; cr; cr.
s nextPutAll: aVersion info summary]
!
description
^ 'mailto://', email
!
emailAddress: aString
email _ aString
!
messageForVersion: aVersion
| message data |
message := MailMessage empty.
message setField: 'from' toString: MailSender userName.
message setField: 'to' toString: email.
message setField: 'subject' toString: (self subjectForVersion: aVersion).
message body:
(MIMEDocument
contentType: 'text/plain'
content: (self bodyForVersion: aVersion)).
"Prepare the gzipped data"
data _ RWBinaryOrTextStream on: String new.
aVersion fileOutOn: data.
message addAttachmentFrom: data reset withName: aVersion fileName.
^ message
!
subjectForVersion: aVersion
^ '[Package] ', aVersion info name
! !
!MCSmtpRepository class methodsFor:'documentation'!
version
^ '$Header: /cvs/stx/stx/goodies/monticello/MCSmtpRepository.st,v 1.1 2006-11-22 13:22:53 cg Exp $'
! !