Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

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

未关闭
#701 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
30/100
Issue 类型
功能
描述清晰度
需要澄清
活跃度
停滞
技术栈
go
领域
api

调研方向

从 SDK 中的 Messages().Post 入口点开始,并将其 model.Messageable 参数与文档中记录的 /users/{id | userPrincipalName}/mailFolders/{id}/messages 端点进行比较。检查请求路径是否能够表示带有 text/plain 的 base64 编码 RFC 5322 内容;完成的标准是确定 SDK 是否支持,或记录缺失的请求路径。

由索引模型根据 Issue 内容生成。

描述

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).

主要语言
Go
星标
332
派生
43
平均合并
6 小时 42 分钟
30 天内合并 PR
4

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

microsoftgraph/msgraph-sdk-go 的其他 Issue

查看 microsoftgraph/msgraph-sdk-go 的全部 Issue

相似的 Issue

更多 Go Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。