code: public void setType(String type) throws ApplicationException {
  	type = type.toLowerCase().trim();
  	if (type.equals("text/plain") || type.equals("plain") || type.equals("text")) getPart().isHTML(false);
  	// mail.setType(lucee.runtime.mail.Mail.TYPE_TEXT);
  	else if (type.equals("text/html") || type.equals("html") || type.equals("htm")) getPart().isHTML(true);
  	else throw new ApplicationException("attribute type of tag mail has an invalid values", "valid values are [plain,text,html] but value is now [" + type + "]");
  	// throw new ApplicationException(("invalid type "+type);
      }
docs: set the value type Specifies extended type attributes for the message.
  
  @param type value to set
  @throws ApplicationException