|
|
|
@ -56,7 +56,8 @@ public class EmailHandler extends BaseHandler implements Handler {
|
|
|
|
|
MailAccount account = getAccountConfig(taskInfo.getSendAccount());
|
|
|
|
|
try {
|
|
|
|
|
File file = StrUtil.isNotBlank(emailContentModel.getUrl()) ? AustinFileUtils.getRemoteUrl2File(dataPath, emailContentModel.getUrl()) : null;
|
|
|
|
|
MailUtil.send(account, taskInfo.getReceiver(), emailContentModel.getTitle(), emailContentModel.getContent(), true, file);
|
|
|
|
|
String result = Objects.isNull(file) ? MailUtil.send(account, taskInfo.getReceiver(), emailContentModel.getTitle(), emailContentModel.getContent(), true) :
|
|
|
|
|
MailUtil.send(account, taskInfo.getReceiver(), emailContentModel.getTitle(), emailContentModel.getContent(), true, file);
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
log.error("EmailHandler#handler fail!{},params:{}", Throwables.getStackTraceAsString(e), taskInfo);
|
|
|
|
|
return false;
|
|
|
|
|