Commit 34a67a02 authored by Quxl's avatar Quxl

优化发送邮件,使用独立线程发送邮件

parent 5b72237e
......@@ -17,7 +17,11 @@ public class EmailServiceImpl implements EmailService {
@Override
public void send(String subject, String content, String... emailAddress) {
MailUtil.sendBySmtp(host, port, is_auth, from, password, subject, content, null, emailAddress);
new Thread() {
public void run() {
MailUtil.sendBySmtp(host, port, is_auth, from, password, subject, content, null, emailAddress);
}
}.start();
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment