Skip to content

Commit 27c4c16

Browse files
committed
update mail config #248
1 parent 80783e1 commit 27c4c16

File tree

3 files changed

+26
-7
lines changed

3 files changed

+26
-7
lines changed

server/application-server/compose.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ services:
3838
restart: unless-stopped
3939
volumes:
4040
- ./postfix-config:/config # See https://github.com/ls1admin/postfix-container-tum-mailrelay/tree/main for details
41-
hostname: hephaestus.aet.cit.tum.de
41+
hostname: ${APP_HOSTNAME:localhost}
4242
networks:
4343
- app-network
4444

server/application-server/src/main/resources/application-prod.yml

+18
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,19 @@ spring:
1313
jwt:
1414
issuer-uri: ${KEYCLOAK_URL}/realms/${KEYCLOAK_REALM}
1515

16+
mail:
17+
host: ${POSTFIX_HOST:localhost}
18+
port: ${POSTFIX_PORT:25}
19+
username: ${POSTFIX_USERNAME:}
20+
password: ${POSTFIX_PASSWORD:}
21+
properties:
22+
mail:
23+
transport:
24+
protocol: smtp
25+
smtp:
26+
starttls:
27+
enable: true
28+
1629
hephaestus:
1730
host-url: ${APPLICATION_HOST_URL}
1831

@@ -30,6 +43,11 @@ hephaestus:
3043
intelligence-service:
3144
url: ${INTELLIGENCE_SERVICE_URL}
3245

46+
mail:
47+
enabled: ${MAIL_ENABLED:false}
48+
sender: ${MAIL_SENDER:}
49+
signature: ${MAIL_SIGNATURE:}
50+
3351
keycloak:
3452
url: ${KEYCLOAK_URL}
3553
realm: ${KEYCLOAK_REALM}

server/application-server/src/main/resources/application.yml

+7-6
Original file line numberDiff line numberDiff line change
@@ -34,17 +34,18 @@ spring:
3434
suffix: .html
3535

3636
mail:
37-
host: ${POSTFIX_HOST:localhost}
38-
port: ${POSTFIX_PORT:25}
39-
username: ${POSTFIX_USERNAME:}
40-
password: ${POSTFIX_PASSWORD:}
37+
host: smtp.gmail.com
38+
port: 587
39+
username: ${POSTFIX_USERNAME:} # gmail email address e.g [email protected]
40+
password: ${POSTFIX_PASSWORD:} # app code password from gmail. how to: https://support.google.com/mail/answer/185833?hl=en
4141
properties:
4242
mail:
4343
transport:
4444
protocol: smtp
4545
smtp:
4646
starttls:
4747
enable: true
48+
debug: true
4849

4950
springdoc:
5051
default-produces-media-type: application/json
@@ -69,8 +70,8 @@ hephaestus:
6970
url: http://localhost:8000
7071

7172
mail:
72-
enabled: ${MAIL_ENABLED:true}
73-
sender: ${MAIL_SENDER:[email protected]}
73+
enabled: false
74+
sender: ${MAIL_SENDER:}
7475
signature: ${MAIL_SIGNATURE:}
7576

7677
keycloak:

0 commit comments

Comments
 (0)