Communications
Send legacy notification-type emails
/a/Notice_sendEmail
Queue the static emails configured by active legacy notification-type rows.
When to use this endpoint
Use Notice_sendEmail only with trusted values from the legacy notification-type configuration. No production CRM1 or CRM2 caller was found, so this is not the normal job-notification delivery path.
Authentication and permissions
The request must authenticate with signed API-key fields or a logged-in CRM session. The handler requires login and performs no additional page or role-permission check.
The read or write is limited to the authenticated tenant. Notice endpoints that say “current user” use the authenticated session user ID within that tenant.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
type | Integer string | Yes | Legacy notification type matched against active notification_types.type rows. The complete trimmed value must validate as an integer. |
tableName | String | Yes | Exact trimmed notification_types.table_name match. Only ASCII letters, digits, and underscores are accepted. |
Example request
$result = FM_api('Notice_sendEmail', [
'type' => '1',
'tableName' => 'invoices',
]);
Example response
{"ok":"1"}
Errors and unusual responses
| Response | Condition |
|---|---|
{"error":"not logged in"} | No authenticated tenant context is available. Invalid signed credentials can be rejected by the dispatcher before the handler runs. |
{"error":"missing or invalid parameter: type"} | type is absent. |
{"error":"missing or invalid parameter: tableName"} | tableName is absent. |
{"error":"invalid parameter: type"} | The value is blank or is not a complete integer string. |
{"error":"invalid parameter: tableName"} | The trimmed value is blank or contains characters outside letters, digits, and underscores. |
Legacy application errors may be returned with HTTP 200. Check the decoded response for error, not only the HTTP status.
Behaviour and edge cases
- Only rows with
status=1and exact matching table/type selectors are processed. No match is treated as successful no-op. - For each matching row, the endpoint normalizes addresses configured under
recipient.other. The historicalrecipient.otherskey remains accepted for compatibility; other recipient categories are ignored. - The configured
reply_tovalue is forwarded as mail metadata when nonblank. No object data or template codes are merged by this handler. - A matching rule with no usable “other” recipients is skipped.
- The success response does not include how many rules matched or whether
Core_mailaccepted each message.
Side effects
- Calls
Core_mailonce per matching notification-type row with usable recipients, mail type2, encoded recipients, static body, and subject/body/reply-to metadata.
See it in Fieldmotion
CRM1
No direct CRM1 production caller was found. Notification settings are maintained elsewhere, but their ordinary event delivery does not call this endpoint directly.
CRM2
No direct CRM2 production caller was found.
Related endpoints
Notice_createNoticecreates in-CRM notices and can queue an accompanying recipient email.