Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Is there a way to post a raw RFC 5322 message to the create message endpoint?

Aperta
#701 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
30/100
Tipo di issue
Funzionalità
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
go
Ambito
api

Direzione di ricerca

Iniziare dal punto di ingresso Messages().Post nell’SDK e confrontare il relativo parametro model.Messageable con l’endpoint documentato /users/{id | userPrincipalName}/mailFolders/{id}/messages. Verificare se il percorso della richiesta può rappresentare contenuto RFC 5322 codificato in base64 con text/plain; l’attività è completata quando è stato stabilito il supporto dell’SDK oppure è stato documentato il percorso della richiesta mancante.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Needs Attention :wave:

I have an RFC 5322-formatted message, and I'm trying to POST it to the /users/{id | userPrincipalName}/mailFolders/{id}/messages endpoint.

Per the docs for that API, that is possible when POSTing a request to that endpoint with a content type of text/plain. Specifically, this note in the "Request headers" section for Content-Type (emphasis mine):

Use application/json for a JSON object and text/plain for MIME content.

Combined with this additional note in the "Request body" section:

When specifying the body in MIME format, provide the MIME content with the applicable Internet message headers ("To", "CC", "BCC", "Subject"), all encoded in base64 format in the request body.

I can't find a way to do this with the SDK. Am I missing something, or does the SDK not support this?

I'm able to get as far as this:

client.
	Users().
	ByUserId(userID).
	MailFolders().
	ByMailFolderId("inbox").
	Messages().
	Post(
		ctx,
		// This doesn't compile as it isn't `model.Messageable`.
		// How do I send this?
		base64.StdEncoding.EncodeToString(email),
		nil,
	)

A model.Messaage gets sent as application/json, and can't be built from an RFC 5322 message (as far as I can tell).

Lingua principale
Go
Stelle
332
Fork
43
Merge medio
6h 42m
PR unite (30g)
4

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di microsoftgraph/msgraph-sdk-go

Tutte le issue di microsoftgraph/msgraph-sdk-go

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.