Skip to content

Commit 7f1512b

Browse files
authored
Added mock email server (#1170)
1 parent e320693 commit 7f1512b

File tree

2 files changed

+21
-7
lines changed

2 files changed

+21
-7
lines changed

src/main/docker/smtp-server.yml

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
version: '3'
2+
3+
services:
4+
fake-smtp-server:
5+
image: gessnerfl/fake-smtp-server:2.2.1
6+
hostname: 'fake-smtp-server'
7+
restart: always
8+
environment:
9+
- FAKESMTP_AUTHENTICATION_USERNAME=myuser
10+
- FAKESMTP_AUTHENTICATION_PASSWORD=mysecretpassword
11+
ports:
12+
- 8025:8025 #expose smtp port
13+
- 8082:8080 #expose web ui
14+
- 8081:8081 #expose management api

src/main/resources/config/application-dev.yml

+7-7
Original file line numberDiff line numberDiff line change
@@ -55,16 +55,16 @@ spring:
5555
# Remove 'faker' if you do not want the sample data to be loaded automatically
5656
contexts: dev, faker
5757
mail:
58-
host: smtp.gmail.com
59-
username:
60-
password:
61-
port: 587
58+
host: localhost
59+
username: myuser
60+
password: mysecretpassword
61+
port: 8025
6262
protocol: smtp
63-
tls: true
63+
tls: false
6464
properties.mail.smtp:
6565
auth: true
66-
starttls.enable: true
67-
ssl.trust: smtp.gmail.com
66+
starttls.enable: false
67+
ssl.trust:
6868
messages:
6969
cache-duration: PT1S # 1 second, see the ISO 8601 standard
7070
thymeleaf:

0 commit comments

Comments
 (0)