How To
Archived

How do I construct a curl command to successfully send external email via the REST API in OpenIDM 3.x?

Last updated Jan 5, 2021

The purpose of this article is to provide information on constructing a curl command to successfully send external email via the REST API in OpenIDM.


1 reader recommends this article

Archived

This article has been archived and is no longer maintained by ForgeRock.

Overview

You can send external email over REST if required, although you're more likely to use a script in production:

Sending external email

The basic format of the curl command for sending external email via the REST API is:

$ curl -H "Content-Type: application/json" -H "X-OpenIDM-Username: openidm-admin" -H "X-OpenIDM-Password: openidm-admin" -X POST -d '{"from":"sender@example.com", "to":"recipient@example.com", "subject":"Test Email", "body":"Test body text"}' "https://localhost:8080/openidm/external/email?_action=send"
Note

Due to the use of the POST --data option (-d), spaces are permitted in the subject and body parameters without the need for url encoding.

See Also

Integrator's Guide › Sending Email

Related Training

N/A

Related Issue Tracker IDs

N/A


Copyright and Trademarks Copyright © 2021 ForgeRock, all rights reserved.