"{ 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 := UIManager default request: 'Email address:' translated.
^ 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.2 2011-08-20 11:44:29 cg Exp $'
!
version_CVS
^ '$Header: /cvs/stx/stx/goodies/monticello/MCSmtpRepository.st,v 1.2 2011-08-20 11:44:29 cg Exp $'
!
version_SVN
^ '§Id: MCSmtpRepository.st 5 2010-08-29 07:30:29Z vranyj1 §'
! !