public abstract class EmailProvider {
public abstract void sendmail(String to, String subject, String message,
String from, String replyto, String toname, String fromname,
String errorsto, boolean extra) throws IOException;
public abstract class EmailProvider {
public abstract void sendmail(String to, String subject, String message,
String from, String replyto, String toname, String fromname,
String errorsto, boolean extra) throws IOException;
+ public static void init(Properties conf) {
+ try {
+ Class<?> c = Class.forName(conf.getProperty("emailProvider"));
+ instance = (EmailProvider) c.getDeclaredConstructor(
+ Properties.class).newInstance(conf);
+ } catch (ReflectiveOperationException e) {
+ e.printStackTrace();
+ }
+ }