It is common practice to store variable information (like username and password for logging into SMTP account) in web application init-params or context params, in order to not recompile JSP pages when such information changes. It would be very nice to have an ability to provide username & password dynamically to Mailer tags, for example, in the following way: <mt:mail ...> <mt:user><c:out value="${initParam.SMTPUser}"/></mt:user> <mt:password><c:out .../></mt:password> ... </mt:mail> This seems to be the only suitable way, because Mailer taglib does not support JSP EL to pass parameters to tags dynamically. JavaMail 1.2 API provides a way to set default username via mail.smtp.user property (if we pre-configure mail session instance and resolve it via JNDI), but no property exists for setting default password.
A user tag and password tag have been added, they are available in the nightly build.