Document sendToDnc field and Send Email to Contact API behavior#498
Document sendToDnc field and Send Email to Contact API behavior#498promptless-for-oss wants to merge 8 commits into
Conversation
Document the new sendToDnc boolean property that allows sending Emails to Contacts with UNSUBSCRIBED or MANUAL Do Not Contact status while still respecting BOUNCED status.
Documents the email:emails:sendtodnc permission required to set the sendToDnc field via API, and clarifies that PUT requests default this field to false when not explicitly provided.
Document how the endpoint respects the Email's sendToDnc setting for Do Not Contact handling when sending to individual contacts via API.
| * - ``grapesjsbuilder`` | ||
| - associative array | ||
| - Associative array of Email builder configuration | ||
| * - ``sendToDnc`` |
There was a problem hiding this comment.
Added sendToDnc field documentation based on PR #16039 which adds the sendToDnc property to Email.php with API exposure via #[Groups(['email:read', 'email:write'])] annotations.
Source: mautic/mautic#16039
| - boolean | ||
| - When ``true``, the Email sends to Contacts with UNSUBSCRIBED or MANUAL Do Not Contact status, while still respecting BOUNCED status. Defaults to ``false``. | ||
|
|
||
| **Permission:** Requires the ``email:emails:sendtodnc`` permission to set this field via API. If the authenticated User lacks this permission, the API ignores the ``sendToDnc`` parameter. |
There was a problem hiding this comment.
Added permission requirement (email:emails:sendtodnc) documentation and PUT behavior note based on EmailApiController.php changes in PR #15995. The controller's processForm method strips the sendToDnc parameter if the user lacks permission, and defaults it to false for PUT requests.
Source: mautic/mautic#15995
|
|
||
| ``POST /emails/ID/contact/CONTACT_ID/send`` | ||
|
|
||
| Do Not Contact behavior |
There was a problem hiding this comment.
Added Do Not Contact behavior section because EmailApiController::sendLeadAction() changed from always setting ignoreDNC: true to using $entity->getSendToDnc(), meaning the endpoint now respects the Email's sendToDnc setting instead of treating all API-sent emails as transactional.
Source: mautic/mautic#15995
adiati98
left a comment
There was a problem hiding this comment.
@promptless-for-oss please address the suggestions
Wrap the "Do Not Contact behavior" heading and sendToDnc bullet points with vale off/on directives as requested by @adiati98.
|
Thanks for the review! I've applied both suggestions:
The changes have been pushed to the PR branch. |
|
But it should be rebased to the 7.2 branch once available. |
|
Understood! I'll rebase this PR to the |
Open this suggestion in Promptless to view citations and reasoning process
Documents the new sendToDnc boolean field on the Email entity, including the email:emails:sendtodnc permission required to set this field via API, the PUT behavior defaulting to false, and how the Send Email to Contact endpoint now respects this setting for Do Not Contact handling instead of always treating API-sent emails as transactional.
Trigger Events
Tip: Send Promptless a meeting transcript in Slack to generate doc updates 📝