-
Notifications
You must be signed in to change notification settings - Fork 788
Open
Description
{
"host": "mail.xx.com", ## smtp host
"port": "587", ## port
"sa": "DGBOT", ## mail user
"password": "abc@xxxxx", ## mail user password
"username": "[email protected]", ## mail sender
"enable_ssl": false ## mail smtp enable ssl
}
EFAK/efak-api/src/main/java/org/smartloli/kafka/eagle/api/mail/MailUtils.java
Lines 76 to 91 in 3dda491
| private boolean send(String subject, String address, String content, MailServerInfo mailServer) { | |
| MailSenderInfo mailInfo = new MailSenderInfo(); | |
| mailInfo.setMailServerHost(mailServer.getHost()); | |
| mailInfo.setMailServerPort(mailServer.getPort()); | |
| mailInfo.setValidate(true); | |
| mailInfo.setUserName(mailServer.getSa()); | |
| mailInfo.setPassword(mailServer.getPassword()); | |
| mailInfo.setFromAddress(mailServer.getUsername()); | |
| mailInfo.setToAddress(address); | |
| mailInfo.setSubject(subject); | |
| mailInfo.setContent(content); | |
| mailInfo.setEnableSsl(mailServer.isEnableSsl()); | |
| SimpleMailSender sms = new SimpleMailSender(); | |
| return sms.sendHtmlMail(mailInfo);// Send html format | |
| } |
Metadata
Metadata
Assignees
Labels
No labels