Commit e68f44d9 authored by Quxl's avatar Quxl

x

parent a1e2f276
......@@ -14,6 +14,7 @@ public class MailConfig {
private String from;
private String username;
private String password;
private boolean open;
public List<String> getTo() {
return to;
}
......@@ -50,4 +51,10 @@ public class MailConfig {
public void setPassword(String password) {
this.password = password;
}
public boolean isOpen() {
return open;
}
public void setOpen(boolean open) {
this.open = open;
}
}
......@@ -30,6 +30,7 @@ public class EmailService {
}
public void sendForsync(int tryCount, String subject, String content) {
if(config.isOpen()) {
try {
String host = config.getHost();
Integer port = config.getPort();
......@@ -50,6 +51,7 @@ public class EmailService {
}
}
}
}
}
......@@ -3,3 +3,5 @@ server:
spring:
profiles:
active: dev
mail:
open: false
\ No newline at end of file
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