
= JavaMail Configuration

== GETs (reading data)

[caption=]
.JavaMail Configuration API GET functions
[options="autowidth"]
|===
| Resource  | Description

| /config/javamail/default/readmail
| Get the name of the default `readmail` configuration.

| /config/javamail/default/sendmail
| Get the name of the default `sendmail` configuration.

| /config/javamail/readmails
| Get the name of all the existing `readmail` configurations.

| /config/javamail/sendmails
| Get the name of all the existing sendmail configurations.

| /config/javamail/end2ends
| Get the name of all the existing `end2end` mail configurations.

| /config/javamail/readmails/\{name}
| Get the content of the `readmail` configuration named `\{name}`.

| /config/javamail/sendmails/\{name}
| Get the content of the `sendmail` configuration named `\{name}`.

| /config/javamail/end2ends/\{name}
| Get the content of the `end2end` mail configuration named `\{name}`.
|===

== POSTs (adding/updating data)

POST requires form data using `application/xml` or `application/json` as a `Content-Type`.

On a successful request, the Email NBI will be notified about the configuration change.

[caption=]
.JavaMail Configuration API POST functions
[options="autowidth"]
|===
| Resource  | Description

| /config/javamail/readmails
| Adds a new or overrides an existing `readmail` configuration.

| /config/javamail/sendmails
| Adds a new or overrides an existing `sendmail` configuration.

| /config/javamail/end2ends
| Adds a new or overrides an existing `end2end` mail configuration.
|===

== PUTs (updating defaults)

On a successful request, the Email NBI will be notified about the configuration change.

[caption=]
.JavaMail Configuration API PUT functions
[options="autowidth"]
|===
| Resource  | Description

| config/javamail/default/readmail/\{name}
| Sets the `readmail` named `\{name}` as the new default.

| config/javamail/default/sendmail/\{name}
| Sets the `sendmail` named `\{name}` as the new default.
|===

== PUTs (modifying data)

PUT requires form data using `application/x-www-form-urlencoded` as a `Content-Type`.

On a successful request, the Email NBI will be notified about the configuration change.

[caption=]
.JavaMail Configuration API PUT functions
[options="autowidth"]
|===
| Resource  | Description

| /config/javamail/readmails/\{name}
| Updates the content of the `readmail` configuration named `\{name}`.

| /config/javamail/sendmails/\{name}
| Updates the content of the `sendmail` configuration named `\{name}`.

| /config/javamail/end2ends/\{name}
| Updates the content of the `end2end` mail configuration named `\{name}`.
|===

== DELETEs (remove data)

On a successful request, the Email NBI will be notified about the configuration change.

[caption=]
.JavaMail Configuration API DELETE functions
[options="autowidth"]
|===
| Resource  | Description

| /config/javamail/readmails/\{name}
| Removes the `readmail` configuration named `\{name}`.

| /config/javamail/sendmails/\{name}
| Removes the `sendmail` configuration named `\{name}`.

| /config/javamail/end2ends/\{name}
| Removes the `end2end` mail configuration named `\{name}`.
|===
