maildev
maildev copied to clipboard
config with keycloak
Hi,
I use maildev 1.1.0 with docker. I configure keycloak that this.
I have an error
com.sun.mail.util.MailConnectException: Couldn't connect to host, port: localhost:1025, 25; timeout 10000;
nested exception is:
java.net.UnknownHostException: localhost:1025
I have redirect 1025 to 25 on docker.
Best regards
If you use docker-compose you should use the container name rather than the localhost ip (which is the keycloak container itself).
version: '3.5'
services:
keycloak:
image: jboss/keycloak
environment:
KEYCLOAK_USER: ${KEYCLOAK_USER:-admin}
KEYCLOAK_PASSWORD: ${KEYCLOAK_PASSWORD:-admin}
ports:
- ${KEYCLOAK_PORT:-9990}:8080
restart: unless-stopped
maildev:
image: maildev/maildev
ports:
- 1025:25
- 1080:80
And then use maildev
as host as shown in the image: