Create email Notifier
Creates a new email notifier
HTTP Request
POST/api/notifications/notifiers/email
Authorization
Authorization
- Required: Yes
- Permission: Staff with EmailNotifierPermission or Admin
- Permission Code: 2831
- Authentication: Token-based (Authorization: Token <your_api_key>)
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| name | String | Yes | Name of the email notifier |
| host | String | Yes | Host name of the email notifier |
| port | Integer | No | Port number of the email notifier |
| username | String | Yes | Username of the email notifier |
| password | String | Yes | Password of the email notifier |
| from_email | String | Yes | Sending email address of the notifier |
| use_tls | Boolean | No | Whether using tls or not (default=true) |
| use_ssl | Boolean | No | Whether using ssl or not (default=false) |
| fail_siently | Boolean | No | Whether failing silently or not (default=false |
Example Requests
- 🐍 Python
- 🌐 Curl
1import requests
2
3# Create a new email notifier
4response = requests.post('http://www.example.com/api/notifications/notifiers/email',
5 json={
6 "name": "hamgam_mail",
7 "host": "mail.hamgam.online",
8 "port": 887,
9 "username": "info",
10 "password": "somepassword",
11 "from_email": "info@hamgam.online",
12 "use_tls": true,
13 "use_ssl": true,
14 "fail_silently": false
15 },
16 headers={'Authorization': 'Token <your_api_key>'}
17)
18print(response.json())1# Create a new email notifier
2curl -X POST "http://www.example.com/api/notifications/notifiers/email" \
3-H "Authorization: Token <your_api_key>" \
4-H "Content-Type: application/json" \
5-d '{
6d "name": "hamgam_mail",
7 "host": "mail.hamgam.online",
8 "port": 887,
9 "username": "info",
10 "password": "somepassword",
11 "from_email": "info@hamgam.online",
12 "use_tls": true,
13 "use_ssl": true,
14 "fail_silently": false
15}'Response Fields
| Field | Type | Description |
|---|---|---|
| id | Integer | Unique ID of the email notifier. |
| name | String | Name of the email notifier |
| host | String | Host name of the email notifier |
| port | Integer | Port number of the email notifier |
| username | String | Username of the email notifier |
| password | String | Password of the email notifier |
| from_email | String | Sender email address of the email notifier |
| use_tls | Boolean | Whether the email notifier use tls or not |
| use_ssl | Boolean | Whether the email notifier use ssl or not |
| fail_silently | Boolean | Whether the email notifier will fail silently in case of error |
| created_at | String (ISO 8601) | Timestamp when the email notifier was created. |
| updated_at | String (ISO 8601) | Timestamp when the email notifier was last updated. |
Example Response
{
"id": 8,
"name": "hamgam_mail",
"host": "mail.hamgam.online",
"port": 887,
"username": "info",
"password": "somepassword",
"from_email": "info@hamgam.online",
"use_tls": true,
"use_ssl": true,
"fail_silently": false,
"created_at": "2025-12-28T17:43:38.130046Z",
"updated_at": "2025-12-28T17:43:38.130054Z"
}