[keycloak-user] Configuring SMTP settings via rest API
kapil joshi
kapilkumarjoshi001 at gmail.com
Tue Feb 19 09:58:33 EST 2019
Hi all,
Just rechecking, of there is a solution to this issue, please let us know.
Kapil
On Fri, 15 Feb 2019, 17:51 kapil joshi, <kapilkumarjoshi001 at gmail.com>
wrote:
> Thanks Felix, but i was looking more from rest api end, as im using
> javascript adapter of keycloak.
>
> Can someone point to the rest API way of saving SMTP settings.
>
> Thanks
> Kapil
>
>
> On Fri, Feb 15, 2019 at 5:50 PM kapil joshi <kapilkumarjoshi001 at gmail.com>
> wrote:
>
>> Thanks Felix, but i was looking more from rest api end, as im using
>> javascript adapter of keycloak.
>>
>> Can someone point to the rest API way of saving SMTP settings.
>>
>> Thanks & regards
>> Kapil
>>
>> On Fri, Feb 15, 2019 at 3:42 PM Felix Knecht <Felix.Knecht at hrm-systems.ch>
>> wrote:
>>
>>> Hi Kapil
>>>
>>> I use something like
>>>
>>> Keycloak keycloak = KeycloakBuilder.builder()
>>> .serverUrl(serverUrl)
>>> .realm(realm)
>>> .clientId(clientId)
>>> .clientSecret(clientSecret)
>>> .username(username)
>>> .password(password)
>>> .build();
>>> RealmRepresentation smtpRealm = new RealmRepresentation();
>>> Map<String, String> smtpServer = new HashMap<>();
>>> smtpServer.put("host", myHost);
>>> smtpServer.put("port", myPort);
>>> smtpServer.put("from", myFrom);
>>> smtpServer.put("auth", "true");
>>> smtpServer.put("user", mySmtpUser);
>>> smtpServer.put("password", mySmtpPassword);
>>> smtpRealm.setSmtpServer(smtpServer);
>>> keycloak.realms().realm(myRealm).update(smtpRealm);
>>>
>>> Regards
>>> Felix
>>>
>>>
>>> > -----Ursprüngliche Nachricht-----
>>> > Von: keycloak-user-bounces at lists.jboss.org <keycloak-user-
>>> > bounces at lists.jboss.org> Im Auftrag von kapil joshi
>>> > Gesendet: Donnerstag, 14. Februar 2019 19:49
>>> > An: keycloak-user at lists.jboss.org
>>> > Betreff: [keycloak-user] Configuring SMTP settings via rest API
>>> >
>>> > Hi all,
>>> >
>>> > I wanted one small example of configuring SMTP settings via rest API.
>>> >
>>> > We are planning to create one similar UI as like keycloak. But use
>>> rest API to set it.
>>> >
>>> > Also how to test the saved settings, like is it saved or not
>>> >
>>> > Thanks
>>> > Kapil
>>> > _______________________________________________
>>> > keycloak-user mailing list
>>> > keycloak-user at lists.jboss.org
>>> > https://lists.jboss.org/mailman/listinfo/keycloak-user
>>>
>>
More information about the keycloak-user
mailing list