[Pkg] The Trunk: System-pre.1042.mcz

commits at source.squeak.org commits at source.squeak.org
Wed Sep 5 14:57:18 UTC 2018


Patrick Rein uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-pre.1042.mcz

==================== Summary ====================

Name: System-pre.1042
Author: pre
Time: 5 September 2018, 4:56:50.998822 pm
UUID: 842afa63-0116-f84c-bb10-e82e86728dfb
Ancestors: System-eem.1041

Fixes a bug with the new MailSender probably due to an incomplete changeset. The missing attributes have already been used but were not part of the protocol of MailSender.

=============== Diff against System-eem.1041 ===============

Item was changed:
  AppRegistry subclass: #MailSender
  	instanceVariableNames: ''
+ 	classVariableNames: 'SmtpServer SmtpServerPort UserEmail UserName UserPassword'
- 	classVariableNames: 'SmtpServer UserName'
  	poolDictionaries: ''
  	category: 'System-Applications'!

Item was added:
+ ----- Method: MailSender class>>isSmtpServerPortSet (in category 'testing') -----
+ isSmtpServerPortSet
+ 	^ SmtpServerPort notNil and: [SmtpServerPort isNumber]
+ !

Item was added:
+ ----- Method: MailSender class>>isUserEmailSet (in category 'testing') -----
+ isUserEmailSet
+ 	^ UserEmail notNil and: [UserEmail notEmpty]
+ !

Item was added:
+ ----- Method: MailSender class>>isUserNameSet (in category 'testing') -----
+ isUserNameSet
+ 	^ UserName notNil and: [UserName notEmpty]
+ !

Item was added:
+ ----- Method: MailSender class>>isUserPasswordSet (in category 'testing') -----
+ isUserPasswordSet
+ 	^ UserPassword notNil and: [UserPassword notEmpty]
+ !

Item was added:
+ ----- Method: MailSender class>>reset (in category 'initialize-release') -----
+ reset
+ 
+ 	UserName := UserPassword := UserEmail := SmtpServer := SmtpServerPort := nil.!

Item was added:
+ ----- Method: MailSender class>>setSmtpServerPort (in category 'settings') -----
+ setSmtpServerPort
+ 	"Set the SMTP server port used to send outgoing messages via"
+ 	SmtpServerPort ifNil: [SmtpServerPort := 25].
+ 	SmtpServerPort := (UIManager default
+ 		request: 'What is your mail server port for outgoing mail?'
+ 		initialAnswer: SmtpServerPort asString) asNumber.
+ !

Item was added:
+ ----- Method: MailSender class>>setUserEmail (in category 'settings') -----
+ setUserEmail
+ 	"Change the user's email for use in composing messages."
+ 
+ 	(UIManager default
+ 			request: 'What is your email address?\(This is the address other people will reply to you)' withCRs
+ 			initialAnswer: (UserEmail ifNil: [UserEmail := '']))
+ 		ifNotNil: [:answer | UserEmail := answer]!

Item was changed:
  ----- Method: MailSender class>>setUserName (in category 'settings') -----
  setUserName
- 	"Change the user's email name for use in composing messages."
  
  	(UIManager default
+ 			request: 'What is your user name on the SMTP server?' withCRs
- 			request: 'What is your email address?\(This is the address other people will reply to you)' withCRs
  			initialAnswer: (UserName ifNil: [UserName := '']))
  		ifNotNil: [:answer | UserName := answer]!

Item was added:
+ ----- Method: MailSender class>>setUserPassword (in category 'settings') -----
+ setUserPassword
+ 
+ 	UserPassword ifNil: [UserPassword := ''].
+ 	(UIManager default
+ 			requestPassword: 'What is your server passwort?' withCRs)
+ 		ifNotNil: [:answer | UserPassword := answer]!

Item was changed:
  ----- Method: MailSender class>>smtpServer (in category 'accessing') -----
  smtpServer
  	"Answer the server for sending email"
  
+ 	self isSmtpServerSet ifFalse: [self setSmtpServer].
+ 	SmtpServer isEmpty ifTrue: [ self error: 'no SMTP server specified' ].
- 	self isSmtpServerSet
- 		ifFalse: [self setSmtpServer].
- 	SmtpServer isEmpty ifTrue: [
- 		self error: 'no SMTP server specified' ].
  
  	^SmtpServer!

Item was added:
+ ----- Method: MailSender class>>smtpServerPort (in category 'accessing') -----
+ smtpServerPort
+ 	"Answer the server for sending email"
+ 
+ 	self isSmtpServerPortSet ifFalse: [self setSmtpServerPort].
+ 	SmtpServerPort isNil ifTrue: [ self error: 'no SMTP server port specified' ].
+ 
+ 	^SmtpServerPort!

Item was added:
+ ----- Method: MailSender class>>userEmail (in category 'accessing') -----
+ userEmail
+ 	"Answer the user name to be used for sending out messages."
+ 
+ 	self isUserEmailSet ifFalse: [self setUserEmail].
+ 
+ 	UserEmail isEmpty ifTrue: [ self error: 'no user email specified' ].
+ 
+ 	^UserEmail!

Item was changed:
  ----- Method: MailSender class>>userName (in category 'accessing') -----
  userName
+ 	"Answer the user name to be used for sending out messages."
- 	"Answer the user name to be used in composing messages."
  
+ 	self isUserNameSet ifFalse: [self setUserName].
- 	(UserName isNil or: [UserName isEmpty])
- 		ifTrue: [self setUserName].
  
  	UserName isEmpty ifTrue: [ self error: 'no user name specified' ].
  
  	^UserName!

Item was added:
+ ----- Method: MailSender class>>userPassword (in category 'accessing') -----
+ userPassword
+ 
+ 	self isUserPasswordSet ifFalse: [self setUserPassword].
+ 
+ 	UserPassword isEmpty ifTrue: [ self error: 'no user name specified' ].
+ 
+ 	^ UserPassword!



More information about the Packages mailing list