Skip to content

Commit 8e3e9e1

Browse files
authored
Update email-headers.md
Update documentation
1 parent b6accf7 commit 8e3e9e1

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

articles/communication-services/concepts/email/email-headers.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,16 @@ ms.date: 01/09/2025
1010
ms.topic: conceptual
1111
ms.service: azure-communication-services
1212
---
13-
# Adding Custom headers
13+
# Adding Reservd Custom headers
1414

1515
Custom headers can be sent along with an email request. These headers are defined as a dictionary. There are some pre defined custom headers which can be used to handle some of the email sending scenarios.
1616

1717

1818
| Custom Header Name | Property |
1919
| --- | --- |
20-
| x-ms-acsemail-ignore-duplicate-content-id | When this header is explicitly set to true, we do not validate duplicate content id and will let the author manage duplicates. |
20+
| x-ms-acsemail-ignore-duplicate-content-id | When this header is explicitly set to true, we do not validate duplicate content id and will let the author manage duplicates. By default we will return a bad request |
2121
| x-ms-acsemail-suppress-invalid-attachment | By default, if the attachment is invalid, we return bad request. If this header is set to true and if an attachment is invalid, we continue with the request without the attachment. |
22-
| x-ms-acsemail-validate-message-id | When this header is explicitly set to true, we validate the internet message id sent by the customer. The validations include checking for RFC 2822 Internet Message Id format and also if there's a duplicate already present. If it fails, we return bad request. If the header is not set and the internet message id validation fails, we remove the message id and let ideas create one. |
23-
22+
| x-ms-acsemail-validate-message-id | When this header is explicitly set to true, we validate the internet message id sent by the customer. The validations include checking for [RFC 2822](https://www.rfc-editor.org/rfc/rfc2822) Internet Message Id format and also if there's a duplicate already present. If it fails, we return bad request. If the header is not set and the internet message id validation fails, we remove the message id and let the service create one. By default, we do not force this validation. <table><thead><tr><th>Internet Message Id</th><th>Validity</th></tr></thead><tbody><tr><td>&lt;[email protected]&gt;</td><td>Valid</td></tr><tr><td>&lt;202501131823.34067409c4494c2c8b2de03ceb26f173-NVZOA======@microsoft.com&gt;</td><td>Valid</td></tr><tr><td>[email protected]</a></td><td>Invalid</td></tr><tr><td>&lt;guid&gt;</td><td>Invalid</td></tr><tr><td>&lt;guid.domain&gt;</td><td>Invalid</td></tr></tbody></table> |
2423

2524
## Send an email message with custom headers
2625

@@ -44,7 +43,7 @@ var toRecipients = new List<EmailAddress>
4443
// Add Custom headers
4544
var customHeaders = new Dictionary<string, string>
4645
{
47-
{"x-ms-acsemail-suppress-invalid-attachment", "true"}, // if the attachment
46+
{"x-ms-acsemail-suppress-invalid-attachment", "true"}, // if the attachment is of invalid type, this request will still be processed without the attachment.
4847
}
4948

5049
var emailAttachment = new EmailAttachment("attachment.pdf", MediaTypeNames.Application.Pdf, contentBinaryData);

0 commit comments

Comments
 (0)