public ErrorReporterViaEmail(String host, String username, String password, List<String> to, String from, String subject) throws NoSuchProviderException, AddressException {
Properties props = new Properties();
props.setProperty("mail.transport.protocol", "smtp");
props.setProperty("mail.host", host);
Authenticator authenticator = null;
if (given(username)) {
authenticator = new MyAuthenticator(username, password);
props.put("mail.smtp.user", username);
props.put("mail.smtp.auth", "true");
}