如何使用 Google API 版本 2 将 chuck 中的 EML 数据迁移到 Google Apps Mail?

发布于 2024-08-31 17:43:28 字数 481 浏览 4 评论 0原文

我正在将 EML 邮件迁移到 Google Apps。 当我尝试迁移带有两个附件 2.1 MB 和 1.96 MB 的 EML 文件时。

它抛出异常:

“请求被中止:请求被取消。”

我正在使用下面的代码:

MailItemEntry[] entries = new MailItemEntry[1];
String msg = File.ReadAllText(EmlPath);
entries[0] = new MailItemEntry();
entries[0].Rfc822Msg = new Rfc822MsgElement(msg);

........

MailItemFeed feed = mailItemService.Batch(domain, UserName, entries);

我认为发送数据可以解决这个问题。那么,如何将此 EML 数据分块发送到 Google Apps?

谢谢

I am migrating EML mails to Google Apps.
When i try to Migrate a EML file with two attachment 2.1 MB and 1.96 MB.

It is throwing exception:

"The request was aborted: The request was canceled."

I am using below code:

MailItemEntry[] entries = new MailItemEntry[1];
String msg = File.ReadAllText(EmlPath);
entries[0] = new MailItemEntry();
entries[0].Rfc822Msg = new Rfc822MsgElement(msg);

........

MailItemFeed feed = mailItemService.Batch(domain, UserName, entries);

I think sending data can resolve this issue.So,how can send this EML data in chunk to Google Apps?

Thanx

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

江城子 2024-09-07 17:43:28

只是想一想,如果您使用 IMAP 来代替 Google 的 API 来达到同样的目的,这会有帮助吗?

我之所以提出这个建议,是因为我使用通过 IMAP 连接的 Outlook 将我的官方 Microsoft Exchange (200 MB) 邮箱存档到我的个人 Google Apps 邮箱(在标签下),取得了巨大成功。

我想也许使用 API 在 Google 服务器端或您的 C# 代码上存在某种超时问题(您检查过套接字超时设置吗?)

干杯!

Just a thought, instead of using the Google's API if you use IMAP instead for the same purpose does it help?

The reason I am proposing it is because, I have had great success in archiving my official Microsoft exchange (200 MB) mailbox into my personal Google Apps mailbox (under a label) using Outlook connected through IMAP.

I am thinking maybe using the API has some kind of timeout issue either on the Google server side or on your c# code (did you check your socket timeout settings?)

Cheers!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文