OfficeDev / office-js

A repo and NPM package for Office.js, corresponding to a copy of what gets published to the official "evergreen" Office.js CDN, at https://appsforoffice.microsoft.com/lib/1/hosted/office.js.
https://learn.microsoft.com/javascript/api/overview
Other
668 stars 95 forks source link

How to Generate an Email with a Different ‘From’ Address in Office.js and Graph API #4701

Closed CodeCube0 closed 1 month ago

CodeCube0 commented 1 month ago

Hello,

I am working on an Office add-in and need to generate an email with a ‘from’ address that is different from the one that initiated the add-in. I would like to know how to achieve this using both Office.js and Microsoft Graph API.

In my add-in, I am using Office.js to create and send emails. However, I am unable to set a different ‘from’ address. Is there a way to specify a different ‘from’ address using Office.js?

I am also exploring the use of Microsoft Graph API to send emails with a different ‘from’ address. My current attempt results in an error indicating that the ‘from’ property is not allowed. How can I correctly set a different ‘from’ address using Graph API?

Any guidance or examples on how to achieve this with either Office.js or Graph API would be greatly appreciated.

Thank you!

Feel free to adjust any details as needed.

shanshanzheng-dev commented 1 month ago

Hi @CodeCube0 Thanks for reaching us. You can try this reference: https://learn.microsoft.com/en-us/graph/outlook-send-mail-from-other-user. Hi @Rick-Kirkham, do you have any insights about this question? Thanks.

microsoft-github-policy-service[bot] commented 1 month ago

This issue has been automatically marked as stale because it is marked as needing author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. Thank you for your interest in Office Add-ins!

microsoft-github-policy-service[bot] commented 1 month ago

This issue has been closed due to inactivity. Please comment if you still need assistance and we'll re-open the issue.