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