use of io.jpom.plugin.IPlugin in project Jpom by dromara.
the class EmailUtil method send.
/**
* 发送邮箱
*
* @param email 收件人
* @param title 标题
* @param context 内容
*/
public static void send(String email, String title, String context) throws Exception {
if (config == null) {
// 没有数据才加载
refreshConfig();
}
//
Map<String, Object> mailMap = new HashMap<>(10);
mailMap.put("toEmail", email);
mailMap.put("title", title);
mailMap.put("context", context);
//
IPlugin plugin = PluginFactory.getPlugin("email");
plugin.execute(JSONObject.toJSON(config), mailMap);
}
Aggregations