Update Email Configuration
Updates the email configuration for a given Social Context.
Resource Information
This service uses the tomcat application on port 8080 by default. To see a list of default ports click here
The context for this API is /crafter-social
, please prefix the API URLs with this context.
HTTP Verb
|
POST
|
URL
|
/api/3/system/context/preferences/email/config |
Response Formats
|
JSON |
Parameters
Name
|
Type
|
Required
|
Description
|
---|---|---|---|
context
|
String
|
✓
|
The ID of the Social Context
|
encoding
|
String
|
✓
|
Character encoding for the email body
|
host
|
String
|
✓
|
The hostname of the email server
|
port
|
String
|
✓
|
The port of the email server
|
auth
|
Boolean
|
✓
|
Enable if the email server requires
authentication
|
username
|
String
|
✓
|
The username for the email server
|
password
|
String
|
✓
|
The password for the email server
|
tls
|
Boolean
|
✓
|
Enable if the email server requires
a secure connection
|
replyTo
|
String
|
✓
|
Email address used for replies
|
from
|
String
|
✓
|
Email address used to send notifications
|
priority
|
Integer
|
✓
|
The priority for the emails
|
subject
|
String
|
✓
|
The subject for the emails
|
Example
Request
POST .../api/3/system/context/preferences/email/config
context=f5b143c2-f1c0-4a10-b56e-f485f00d3fe9
password=passw0rd
port=25
auth=true
subject=Site1 Updates
host=mail.example.com
replyTo=reply@example.com
tls=true
from=site1@example.com
encoding=UTF-8
priority=3
username=user
Response
Status 200 OK
1{
2 "password": "passw0rd",
3 "port": 25,
4 "auth": true,
5 "subject": "Site1 Updates",
6 "host": "mail.example.com",
7 "replyTo": "reply@example.com",
8 "tls": true,
9 "from": "site1@example.com",
10 "encoding": "UTF-8",
11 "priority": 3,
12 "username": "user"
13}
Responses
Status
|
Location
|
Response Body
|
---|---|---|
200
|
See example above.
|
|
401
|
{ "message" : "User must be logged in" } |
|
403
|
{ "message" : "Current subject does not have
permission to execute global action ..." }
|
|
500
|
{ "message" : "Internal server error" } |