I have rewritten the way that the SendMail function processes its first argument, to exploit the utility class OptionsParameter which is used to support all 3.1 functions having a map-valued options parameter.
I have changed boolean-valued parameters like "html" to accept a boolean, and integer-valued parameters like "port" to accept an integer, but for backwards compatibility I've retained the ability to convert this from a string by means of a new feature in the OptionsParameter class.
I've also added to the OptionsParameter class the ability to declare that certain properties are mandatory. We still need to review which parameters should be mandatory: I'm not sure for example whether it makes sense for username and password to be omitted.
I've extended the implementation so that if the first argument contains any (string-valued) property whose name begins with "mail.", it is copied to the properties supplied to the call on Session.getDefaultInstance(), to allow setting of properties such as "mail.smtp.timeout".
These changes need to be documented.