Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NewGraphMail -Send doesn't include attachments #4

Open
rwllr opened this issue Mar 20, 2023 · 2 comments
Open

NewGraphMail -Send doesn't include attachments #4

rwllr opened this issue Mar 20, 2023 · 2 comments

Comments

@rwllr
Copy link
Contributor

rwllr commented Mar 20, 2023

Because the order of how things are processed, attachments don't get included when -Send parameter is included.

@rwllr
Copy link
Contributor Author

rwllr commented Mar 29, 2023

Using Pipeline instead to do this can work, however means the app requires additional permissions of Mail.ReadWrite as well as Mail.Send.

I think what we can do to improve things is that for attachment sizes of under 3MB refactoring New-MSGraphMailAttachment so it can return $AttachmentItem rather than uploading and then including it in a single Send API call.

https://learn.microsoft.com/en-us/graph/api/user-sendmail

@homotechsual
Copy link
Owner

So I'm going to fix this for attachment total size under 4MB - attachments over 4MB will still require ReadWrite as that workflow requires saving a draft.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants