{"id":5247,"date":"2017-01-02T12:52:04","date_gmt":"2017-01-02T18:52:04","guid":{"rendered":"http:\/\/allidm.com\/blog\/?p=5247"},"modified":"2017-01-02T21:54:13","modified_gmt":"2017-01-03T03:54:13","slug":"forgerock-openidm-test-email-configuration-using-rest-api","status":"publish","type":"post","link":"https:\/\/allidm.com\/blog\/forgerock-openidm-test-email-configuration-using-rest-api\/","title":{"rendered":"ForgeRock OpenIDM Test Email Configuration using REST API"},"content":{"rendered":"<h2>ForgeRock OpenIDM Test Email Configuration using REST API<\/h2>\n<p>The OpenIDM outbound email service relies on a configuration object to identify the email account that is used to send messages. The configuration file is located at openidm\/conf\/external.email.json.<\/p>\n<p>The OpenIDM configuration file have the following structure:<\/p>\n<p>{<br \/>\n&#8220;host&#8221; : &#8220;smtp.gmail.com&#8221;,<br \/>\n&#8220;port&#8221; : &#8220;587&#8221;,<br \/>\n&#8220;debug&#8221; : false,<br \/>\n&#8220;auth&#8221; : {<br \/>\n&#8220;enable&#8221; : true,<br \/>\n&#8220;username&#8221; : &#8220;xxxxxxxx&#8221;,<br \/>\n&#8220;password&#8221; : &#8220;xxxxxxxx&#8221;<br \/>\n},<br \/>\n&#8220;starttls&#8221; : {<br \/>\n&#8220;enable&#8221; : true<br \/>\n}<br \/>\n}<\/p>\n<p>In order to configure and test OpenIDM Email service follow the next steps:<\/p>\n<p>1. Login to the OpenIDM Admin Console (\u00a0https:\/\/localhost:8443\/admin\/ ) with the openidm-admin credentials.<\/p>\n<p>2. OpenIDM present you the menu options. Go to Menu Configure and Select System Preferences<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/allidm.com\/blog\/wp-content\/uploads\/2017\/01\/Identity_Management_Forgerock_OpenIDM_2.png\"><img data-recalc-dims=\"1\" decoding=\"async\" data-attachment-id=\"5249\" data-permalink=\"https:\/\/allidm.com\/blog\/forgerock-openidm-test-email-configuration-using-rest-api\/identity_management_forgerock_openidm_2\/#main\" data-orig-file=\"https:\/\/i0.wp.com\/allidm.com\/blog\/wp-content\/uploads\/2017\/01\/Identity_Management_Forgerock_OpenIDM_2.png?fit=1503%2C844&amp;ssl=1\" data-orig-size=\"1503,844\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Identity_Management_Forgerock_OpenIDM_2\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/allidm.com\/blog\/wp-content\/uploads\/2017\/01\/Identity_Management_Forgerock_OpenIDM_2.png?fit=680%2C382&amp;ssl=1\" loading=\"lazy\" class=\"alignnone size-full wp-image-5249\" src=\"https:\/\/i0.wp.com\/allidm.com\/blog\/wp-content\/uploads\/2017\/01\/Identity_Management_Forgerock_OpenIDM_2.png?resize=680%2C382\" alt=\"\" width=\"680\" height=\"382\" srcset=\"https:\/\/i0.wp.com\/allidm.com\/blog\/wp-content\/uploads\/2017\/01\/Identity_Management_Forgerock_OpenIDM_2.png?w=1503&amp;ssl=1 1503w, https:\/\/i0.wp.com\/allidm.com\/blog\/wp-content\/uploads\/2017\/01\/Identity_Management_Forgerock_OpenIDM_2.png?resize=300%2C168&amp;ssl=1 300w, https:\/\/i0.wp.com\/allidm.com\/blog\/wp-content\/uploads\/2017\/01\/Identity_Management_Forgerock_OpenIDM_2.png?resize=768%2C431&amp;ssl=1 768w, https:\/\/i0.wp.com\/allidm.com\/blog\/wp-content\/uploads\/2017\/01\/Identity_Management_Forgerock_OpenIDM_2.png?resize=1024%2C575&amp;ssl=1 1024w, https:\/\/i0.wp.com\/allidm.com\/blog\/wp-content\/uploads\/2017\/01\/Identity_Management_Forgerock_OpenIDM_2.png?resize=250%2C140&amp;ssl=1 250w, https:\/\/i0.wp.com\/allidm.com\/blog\/wp-content\/uploads\/2017\/01\/Identity_Management_Forgerock_OpenIDM_2.png?w=1360 1360w\" sizes=\"auto, (max-width: 680px) 100vw, 680px\" \/><\/a><\/p>\n<p>3. In the OpenIDM System Preferences select the Email navigation tab and complete the host, port &amp; user name configuration.<\/p>\n<p>Saving on this screen will be saved in the OpenIDM configuration file called\u00a0\u00a0<strong>openidm\/conf\/external.email.json<\/strong><\/p>\n<p><a href=\"https:\/\/i0.wp.com\/allidm.com\/blog\/wp-content\/uploads\/2017\/01\/Identity_Management_Forgerock_OpenIDM_3.png\"><img data-recalc-dims=\"1\" decoding=\"async\" data-attachment-id=\"5250\" data-permalink=\"https:\/\/allidm.com\/blog\/forgerock-openidm-test-email-configuration-using-rest-api\/identity_management_forgerock_openidm_3\/#main\" data-orig-file=\"https:\/\/i0.wp.com\/allidm.com\/blog\/wp-content\/uploads\/2017\/01\/Identity_Management_Forgerock_OpenIDM_3.png?fit=1431%2C847&amp;ssl=1\" data-orig-size=\"1431,847\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Identity_Management_Forgerock_OpenIDM_3\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/allidm.com\/blog\/wp-content\/uploads\/2017\/01\/Identity_Management_Forgerock_OpenIDM_3.png?fit=680%2C402&amp;ssl=1\" loading=\"lazy\" class=\"alignnone size-full wp-image-5250\" src=\"https:\/\/i0.wp.com\/allidm.com\/blog\/wp-content\/uploads\/2017\/01\/Identity_Management_Forgerock_OpenIDM_3.png?resize=680%2C402\" alt=\"\" width=\"680\" height=\"402\" srcset=\"https:\/\/i0.wp.com\/allidm.com\/blog\/wp-content\/uploads\/2017\/01\/Identity_Management_Forgerock_OpenIDM_3.png?w=1431&amp;ssl=1 1431w, https:\/\/i0.wp.com\/allidm.com\/blog\/wp-content\/uploads\/2017\/01\/Identity_Management_Forgerock_OpenIDM_3.png?resize=300%2C178&amp;ssl=1 300w, https:\/\/i0.wp.com\/allidm.com\/blog\/wp-content\/uploads\/2017\/01\/Identity_Management_Forgerock_OpenIDM_3.png?resize=768%2C455&amp;ssl=1 768w, https:\/\/i0.wp.com\/allidm.com\/blog\/wp-content\/uploads\/2017\/01\/Identity_Management_Forgerock_OpenIDM_3.png?resize=1024%2C606&amp;ssl=1 1024w, https:\/\/i0.wp.com\/allidm.com\/blog\/wp-content\/uploads\/2017\/01\/Identity_Management_Forgerock_OpenIDM_3.png?resize=250%2C148&amp;ssl=1 250w, https:\/\/i0.wp.com\/allidm.com\/blog\/wp-content\/uploads\/2017\/01\/Identity_Management_Forgerock_OpenIDM_3.png?w=1360 1360w\" sizes=\"auto, (max-width: 680px) 100vw, 680px\" \/><\/a>4. Using any REST client for your preference make a call to the REST API passing the right parameters.<\/p>\n<p>OpenIDM Rest URL: http:\/\/localhost:8080\/openidm\/external\/email?_action=send<\/p>\n<p>Make sure you configure basic authorization and content type.<\/p>\n<p>Username:\u00a0application\/json<br \/>\nContent-Type :\u00a0application\/json<\/p>\n<p>Specify the body for the request:<\/p>\n<p>{<br \/>\n&#8220;from&#8221;:&#8221;openidm@opendim.demo.com&#8221;,<br \/>\n&#8220;to&#8221;:&#8221;your.email@gmail.com&#8221;,<br \/>\n&#8220;subject&#8221;:&#8221;OpenIDM Test Email&#8221;,<br \/>\n&#8220;body&#8221;:&#8221;Testing REST Service for email in OpenIDM&#8221;<br \/>\n}<\/p>\n<p><img data-recalc-dims=\"1\" decoding=\"async\" data-attachment-id=\"5248\" data-permalink=\"https:\/\/allidm.com\/blog\/forgerock-openidm-test-email-configuration-using-rest-api\/identity_management_forgerock_openidm_1\/#main\" data-orig-file=\"https:\/\/i0.wp.com\/allidm.com\/blog\/wp-content\/uploads\/2017\/01\/Identity_Management_Forgerock_OpenIDM_1.png?fit=1013%2C833&amp;ssl=1\" data-orig-size=\"1013,833\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Identity_Management_Forgerock_OpenIDM_1\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/allidm.com\/blog\/wp-content\/uploads\/2017\/01\/Identity_Management_Forgerock_OpenIDM_1.png?fit=680%2C559&amp;ssl=1\" loading=\"lazy\" class=\"alignnone size-full wp-image-5248\" src=\"https:\/\/i0.wp.com\/allidm.com\/blog\/wp-content\/uploads\/2017\/01\/Identity_Management_Forgerock_OpenIDM_1.png?resize=680%2C559\" alt=\"\" width=\"680\" height=\"559\" srcset=\"https:\/\/i0.wp.com\/allidm.com\/blog\/wp-content\/uploads\/2017\/01\/Identity_Management_Forgerock_OpenIDM_1.png?w=1013&amp;ssl=1 1013w, https:\/\/i0.wp.com\/allidm.com\/blog\/wp-content\/uploads\/2017\/01\/Identity_Management_Forgerock_OpenIDM_1.png?resize=300%2C247&amp;ssl=1 300w, https:\/\/i0.wp.com\/allidm.com\/blog\/wp-content\/uploads\/2017\/01\/Identity_Management_Forgerock_OpenIDM_1.png?resize=768%2C632&amp;ssl=1 768w, https:\/\/i0.wp.com\/allidm.com\/blog\/wp-content\/uploads\/2017\/01\/Identity_Management_Forgerock_OpenIDM_1.png?resize=250%2C206&amp;ssl=1 250w\" sizes=\"auto, (max-width: 680px) 100vw, 680px\" \/><\/p>\n<p>4. At this point OpenIDM sent an email to specify to in your Jason formatting body.<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/allidm.com\/blog\/wp-content\/uploads\/2017\/01\/Identity_Management_Forgerock_OpenIDM_4.png\"><img data-recalc-dims=\"1\" decoding=\"async\" data-attachment-id=\"5251\" data-permalink=\"https:\/\/allidm.com\/blog\/forgerock-openidm-test-email-configuration-using-rest-api\/identity_management_forgerock_openidm_4\/#main\" data-orig-file=\"https:\/\/i0.wp.com\/allidm.com\/blog\/wp-content\/uploads\/2017\/01\/Identity_Management_Forgerock_OpenIDM_4.png?fit=970%2C159&amp;ssl=1\" data-orig-size=\"970,159\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Identity_Management_Forgerock_OpenIDM_4\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/allidm.com\/blog\/wp-content\/uploads\/2017\/01\/Identity_Management_Forgerock_OpenIDM_4.png?fit=680%2C111&amp;ssl=1\" loading=\"lazy\" class=\"alignnone size-full wp-image-5251\" src=\"https:\/\/i0.wp.com\/allidm.com\/blog\/wp-content\/uploads\/2017\/01\/Identity_Management_Forgerock_OpenIDM_4.png?resize=680%2C111\" alt=\"\" width=\"680\" height=\"111\" srcset=\"https:\/\/i0.wp.com\/allidm.com\/blog\/wp-content\/uploads\/2017\/01\/Identity_Management_Forgerock_OpenIDM_4.png?w=970&amp;ssl=1 970w, https:\/\/i0.wp.com\/allidm.com\/blog\/wp-content\/uploads\/2017\/01\/Identity_Management_Forgerock_OpenIDM_4.png?resize=300%2C49&amp;ssl=1 300w, https:\/\/i0.wp.com\/allidm.com\/blog\/wp-content\/uploads\/2017\/01\/Identity_Management_Forgerock_OpenIDM_4.png?resize=768%2C126&amp;ssl=1 768w, https:\/\/i0.wp.com\/allidm.com\/blog\/wp-content\/uploads\/2017\/01\/Identity_Management_Forgerock_OpenIDM_4.png?resize=250%2C41&amp;ssl=1 250w\" sizes=\"auto, (max-width: 680px) 100vw, 680px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>ForgeRock OpenIDM Test Email Configuration using REST API The OpenIDM outbound email service relies on a configuration object to identify the email account that is used to send messages. The configuration file is located at openidm\/conf\/external.email.json. The OpenIDM configuration file have the following structure: { &#8220;host&#8221; : &#8220;smtp.gmail.com&#8221;, &#8220;port&#8221; : &#8220;587&#8221;, &#8220;debug&#8221; : false, &#8220;auth&#8221; [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"nf_dc_page":"","_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":true,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[264,95,98],"tags":[1485],"class_list":["post-5247","post","type-post","status-publish","format-standard","hentry","category-article","category-forgerock","category-openidm","tag-iam-openidm"],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p25vfy-1mD","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/allidm.com\/blog\/wp-json\/wp\/v2\/posts\/5247","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/allidm.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/allidm.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/allidm.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/allidm.com\/blog\/wp-json\/wp\/v2\/comments?post=5247"}],"version-history":[{"count":4,"href":"https:\/\/allidm.com\/blog\/wp-json\/wp\/v2\/posts\/5247\/revisions"}],"predecessor-version":[{"id":5257,"href":"https:\/\/allidm.com\/blog\/wp-json\/wp\/v2\/posts\/5247\/revisions\/5257"}],"wp:attachment":[{"href":"https:\/\/allidm.com\/blog\/wp-json\/wp\/v2\/media?parent=5247"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/allidm.com\/blog\/wp-json\/wp\/v2\/categories?post=5247"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/allidm.com\/blog\/wp-json\/wp\/v2\/tags?post=5247"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}