定时任务发送邮件不成功
定时任务发送邮件显示 认证失败的用户名或者密码,应该怎么解决?public void execute(JobExecutionContext arg0) throws JobExecutionException {
run();
}
public void run() {
List<LfzMaterialsAlertEntity> listAlert = getAlertList();
for (LfzMaterialsAlertEntity alertEntity : listAlert) {
if (alertEntity.getAlertStatus() != null && alertEntity.getAlertStatus().equals(AlertStaus.ON)) {
LfzFMaterialsEntity materials = getMaterialsList(alertEntity.getMerchandiseNo(),
alertEntity.getCompanyId());
if (materials != null) {
double productSum = materials.getProductSum();
double min = alertEntity.getMaterialsMin();
if (productSum <= min) {
sendMessage(materials);
}
}
}
}
}
/**
* 发送消息
*/
public void sendMessage(LfzFMaterialsEntity materials) {
List<TSUser> list = getUserList(materials.getCompanyId());
for (TSUser user : list) {
if ( /*(user.getUserType().equals(RoleType.Master) || user.getUserType().equals(RoleType.WarehouseMng))&&*/ user.getDepartid().equals(materials.getCompanyId())
) {
Map<String, Object> map = new HashMap<String, Object>();
map.put("id", materials.getId());
TuiSongMsgUtil.sendMessage(materials.getProduct(), "2", "KCTX", map, "516281013@qq.com");
tSSmsService.send();
user = null;
}
}
}
配置文件改了吗,默认的邮箱账号 admin 发表于 2018-5-2 18:25 static/image/common/back.gif
配置文件改了吗,默认的邮箱账号
有修改配置的文档么?是哪个配置文件?
页:
[1]