Skip to content

Commit 6adaf9a

Browse files
committed
376 - Add mail properties for tls
1 parent 3d3948b commit 6adaf9a

File tree

2 files changed

+56
-0
lines changed

2 files changed

+56
-0
lines changed

server/apps/server-app/src/main/resources/config/application.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,13 @@ spring:
119119
port: ${bytechef.mail.port:25}
120120
username: ${bytechef.mail.username}
121121
password: {bytechef.mail.password}
122+
properties:
123+
mail:
124+
smtp:
125+
auth: ${bytechef.mail.auth:false}
126+
starttls:
127+
enable: ${bytechef.mail.tls.starttls.enable:false}
128+
required: ${bytechef.mail.smtp.starttls.required:false}
122129
liquibase:
123130
contexts: mono, #spring.profiles.active#
124131
output:

server/libs/config/app-config/src/main/java/com/bytechef/config/ApplicationProperties.java

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -980,6 +980,7 @@ public static class Mail {
980980
private String baseUrl;
981981
private String password;
982982
private int port = 25;
983+
private Smtp smtp = new Smtp();
983984
private String username;
984985

985986
public String getBaseUrl() {
@@ -1022,8 +1023,12 @@ public void setPort(int port) {
10221023
this.port = port;
10231024
}
10241025

1026+
public Smtp getSmtp() {
1027+
return smtp;
10251028
}
10261029

1030+
public void setSmtp(Smtp smtp) {
1031+
this.smtp = this.smtp;
10271032
}
10281033

10291034
public String getUsername() {
@@ -1033,6 +1038,50 @@ public String getUsername() {
10331038
public void setUsername(String username) {
10341039
this.username = username;
10351040
}
1041+
1042+
public static class Smtp {
1043+
1044+
private boolean auth;
1045+
private Starttls starttls = new Starttls();
1046+
1047+
public boolean isAuth() {
1048+
return auth;
1049+
}
1050+
1051+
public void setAuth(boolean auth) {
1052+
this.auth = auth;
1053+
}
1054+
1055+
public Starttls getStarttls() {
1056+
return starttls;
1057+
}
1058+
1059+
public void setStarttls(Starttls starttls) {
1060+
this.starttls = starttls;
1061+
}
1062+
1063+
public static class Starttls {
1064+
1065+
private boolean enable;
1066+
private boolean required;
1067+
1068+
public boolean isEnable() {
1069+
return enable;
1070+
}
1071+
1072+
public void setEnable(boolean enable) {
1073+
this.enable = enable;
1074+
}
1075+
1076+
public boolean isRequired() {
1077+
return required;
1078+
}
1079+
1080+
public void setRequired(boolean required) {
1081+
this.required = required;
1082+
}
1083+
}
1084+
}
10361085
}
10371086

10381087
/**

0 commit comments

Comments
 (0)