Squeak Class Documentation category index | class index  
 
MailAddressParser
  category: Network-RFC822
  superclass: Object
  subclasses:

Parse mail addresses. The basic syntax is:

addressList := MailAddressParser addressesIn: aString

This currently only returns the bare addresses, but it could also return a list of the address "source codes". For example, if you give it "Joe <joe@foo>, <jane>", it will currently return a list ('joe@foo' 'jane'). It would be nice to also get a list ('Joe <joe@foo>' '<jane>').

instance methods
  building address list
  addToAddress
finishAddress
startNewAddress

  parsing
  grabAddressWithRoute
grabAddresses
grabBasicAddress
grabGroupAddress
removePhrase

  private-initialization
  initialize:

class methods
  examples
  example
exampleFor:

  parsing
  addressesIn:

instance methods
  building address list top  
 

addToAddress

add the last token to the address. removes the token from the collection


 

finishAddress

we've finished one address. Bundle it up and add it to the list of addresses


 

startNewAddress

set up data structures to begin a new address


  parsing top  
 

grabAddressWithRoute

grad an address of the form 'Descriptive Text <real.address@c.d.e>


 

grabAddresses

grab all the addresses in the string


 

grabBasicAddress

grad an address of the form a.b@c.d.e


 

grabGroupAddress

grab an address of the form 'phrase : address, address, ..., address;'


 

removePhrase

skip most characters to the left of this


  private-initialization top  
 

initialize:


class methods
  examples top  
 

example

test out several correct formats


 

exampleFor:

Provide a MethodCall with a valid example of aSelector, ready to run. If 'all', provide all tests we know about for SUnit tests. When 'all', each will be a Verifier, with an expected answer. Returns a list of MethodCalls, Verifiers, or VerifierOfPropertys.


  parsing top  
 

addressesIn:

return a collection of the bare addresses listed in aString