Adding Attachments to E-Mails #908
Unanswered
Max (ic3-zer0)
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
I want to add an attachment to an e-mail draft. If I follow the doc:
`
requestBody := graphmodels.NewAttachment()
name := "smile"
requestBody.SetName(&name)
contentBytes := []byte("r0lGODdhEAYEAA7")
requestBody.SetContentBytes(&contentBytes)
attachments, err := graphClient.Me().Messages().ByMessageId("message-id").Attachments().Post(context.Background(), requestBody, nil)`
I get an error "requestBody.SetContentBytes undefined (type *models.Attachment has no field or method SetContentBytes) ".
From my research it should be
requestBody := graphmodels.NewFileAttachment()Any chance on getting this fixed in the docs?All reactions