question

SaguftaParween-4208 avatar image
0 Votes"
SaguftaParween-4208 asked saldana-msft edited

How can we pass References in email header using msgraph api?

Earlier we are using the Java mail api to send an email and we are using the References attribute to set the application context.But when we are trying to use msgraph api , then we are trying to set the References , its giving error to use the custom header(internetmessageheader) instead . But the custom headers are not respected in reply or forward.

So we want to know is there anyway we can pass References in email header using msgraph api?

microsoft-graph-sdkmicrosoft-graph-mail
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

ShwetaChoudhary-8869 avatar image
0 Votes"
ShwetaChoudhary-8869 answered

Thank you for reaching out.

'Message' resource supports -
1. Adding your own data as custom Internet message headers. Add custom headers only when creating a message, and name them starting with "x-". Once the message has been sent, you cannot modify the headers. To get the headers of a message, apply the $select query parameter in a get message operation.
2. Adding your own data as custom properties as extensions.

You can create a draft of the Forward/Reply message. You can then update or send the draft.

Thanks.



5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

SaguftaParween-4208 avatar image
0 Votes"
SaguftaParween-4208 answered

Hi @ShwetaChoudhary-8869 ,

Thank you for your reply.

We have tried adding custom header and they are available in the recipient mailbox but when the recipient reply / forward the custom headers are getting lost. Do we need to set any extra attributes to retain the custom header value once it got forwarded/replied?

And also we have tried adding our own custom property using singleValueExtendedProperties and observed the extra attributes are also getting lost once the mail get from the reciepient mail box.

Is it possible to update the Reference tag once the message is get created as draft and send it?

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.