public void send ( Email email ) throws EmailException { synchronized ( this ) { EmailConnection connection = openConnection ( ) ; connection . connect ( ) ; connection . send ( email ) ; connection . close ( ) ; } }
Opens a connection sends the email then closes the connection