To me the easiest way is:
docker run -d -p 1025:1025 -p 8025:8025 mailhog/mailhog
In Admin Console:
1) Go to Realm Settings-->Email
2) Set host to localhost
3) Set port to 1025
Mailhog will run on port 8025
On Tue, Nov 14, 2017 at 7:58 PM Stan Silvert <ssilvert(a)redhat.com> wrote:
I just came across what I think is the probably easiest possible way
to
set up Keycloak's SMTP for testing. So I thought I should share.
If you want/need to test things like password recovery and "verify
email", here is the tip:
In Admin Console:
1) Go to Realm Settings-->Email
2) Set host to
aspmx.l.google.com
3) Set port to 25
4) Use whatever you want for the other fields
5) Note that Enable SSL, Enable StartTLS, and Enable Authentication can
be left "OFF".
6) Create a new test user with a gmail email address.
This only works for gmail users, so your test user needs a gmail account
of some kind. It doesn't need to be "(a)gmail.com", but it must be a
gmail account.
For reference:
https://support.google.com/a/answer/176600?hl=en
_______________________________________________
keycloak-dev mailing list
keycloak-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/keycloak-dev