Unable to add "X-Auto-Response-Suppress : All " header into the email sent using graph API.
I am trying to suppress auto response email generated from recipient side by adding "X-Auto-Response-Suppress : All" into the header using graph API (Client credential flow).
According to the code added below.
I can see the "X-Custome-Header-1" in the header, I have sent but not able to see the "X-Auto-response-Suppress".
This Javscript code which I initially used
{
"message": {
"subject": "Test Email 12",
"body": {
"contentType": "Text",
"content": "This is a test email."
},
"toRecipients": [
{
"emailAddress": {
"address": "madhu.a@quadwave.com"
}
}
],
"internetMessageHeaders": [
{
"name": "X-Custom-Header-1",
"value": "CustomValue1"
},
{
"name": "X-Auto-Response-Suppress-Layer",
"value": "All"
},
{
"name":"X-Auto-Response-Suppress",
"value":"All"
}
]
}
}
but later changed that by removing "X-Auto-response-Suppress" and added it directly into Header property of the API like shown below.
Since "X-Auto-Response-Suppress" is not a custom header property, So I have tried calling the API "https://graph.microsoft.com/v1.0/users/help@layersystems.com/sendMail" in the header section I have added this configuration .
But still I am not able able to see it in the header and still receiving auto response email generated from the recipient side. Please help with this. Let me know if I am missing anything. Thank you .
{
"message": {
"subject": "Test Email 7",
"body": {
"contentType": "Text",
"content": "This is a test email."
},
"toRecipients": [
{
"emailAddress": {
"address": "madhu.a@quadwave.com"
}
}
],
"internetMessageHeaders": [
{
"name": "X-Custom-Header-1",
"value": "CustomValue1"
}
]
}
}