Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no explain about email alarm url #720

Open
lordk911 opened this issue Dec 11, 2024 · 0 comments
Open

no explain about email alarm url #720

lordk911 opened this issue Dec 11, 2024 · 0 comments

Comments

@lordk911
Copy link

lordk911 commented Dec 11, 2024

{
    "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
}

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
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant