New methods, a smarty {mail} function and the corresponding email javascript.