/** * This constructs the mail configuration based on the username and * the from address. This constructor is deprecated. * @param the username * @param the from address * @deprecated */ public MailConfiguration(String username, String mailFrom) { this.username = username; this.mailFrom = mailFrom; this.mailHost = ""; mailProperties.put(MAIL_FROM, this.getMailFrom()); mailProperties.put(MAIL_USER, this.getUsername()); mailProperties.put(MAIL_HOST, this.getMailHost()); }
/** * Construct a specification of mail configuration with the given username, * Mail From Address and mail hostname. * @param the username. * @param the from address. * @param the mail hostname. */ public MailConfiguration(String username, String mailFrom, String mailHost) { this.username = username; this.mailFrom = mailFrom; this.mailHost = mailHost; mailProperties.put(MAIL_FROM, this.getMailFrom()); mailProperties.put(MAIL_USER, this.getUsername()); mailProperties.put(MAIL_HOST, this.getMailHost()); }