public void removeMailServer(String hostName) throws SecurityException {
  checkWriteAccess();
  Element mail=_getRootElement("mail");
  Element[] children=XMLConfigWebFactory.getChildren(mail,"server");
  if (children.length > 0) {
    for (int i=0; i < children.length; i++) {
      Element el=children[i];
      String smtp=el.getAttribute("smtp");
      if (smtp != null && smtp.equalsIgnoreCase(hostName)) {
        mail.removeChild(children[i]);
      }
    }
  }
}

public void removeMailServer ( String hostName ) throws SecurityException { checkWriteAccess ( ) ; Element mail = _getRootElement ( "mail" ) ; Element [ ] children = XMLConfigWebFactory . getChildren ( mail , "server" ) ; if ( children . length > 0 ) { for ( int i = 0 ; i < children . length ; i ++ ) { Element el = children [ i ] ; String smtp = el . getAttribute ( "smtp" ) ; if ( smtp != null && smtp . equalsIgnoreCase ( hostName ) ) { mail . removeChild ( children [ i ] ) ; } } } }
removes a mailserver from system
