我在新窗口中发送电子邮件时遇到错误

发布于 2025-01-15 22:05:00 字数 1976 浏览 4 评论 0原文

我正在 Outlook 网页版上创建一个加载项,但在测试它时发现了意外行为。

详细内容如下所述。

  1. 在 Outlook 网页版上单击“新邮件”。

  2. 点击“在新窗口中打开”。

  3. 在“新窗口”上等待大约 10 分钟。

  4. 撰写电子邮件。然后单击“发送”按钮。

  5. 该过程无法继续,我无法发送电子邮件。

  6. 大约 3 分钟后,显示以下错误消息。

  7. “很抱歉,我们无法访问“加载项名称”。请确保您有网络连接。如果问题仍然存在,请稍后重试。”

发生的概率和时间是不规则的。

请告诉我如何解决这个问题。

[2022.04.08]

index.js

/*
 * Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
 * See LICENSE in the project root for license information.
 */

var mailboxItem;

Office.initialize = function (reason) {
    mailboxItem = Office.context.mailbox.item;
}

// Entry point for Contoso Message Body Checker add-in before send is allowed.
// <param name="event">MessageSend event is automatically passed by BlockOnSend code to the function specified in the manifest.</param>
function validateBody(event) {
  Office.context.ui.displayDialogAsync(
  "https://localhost:3000/index.html",
    {
      height: 65,
      width: 40,
      displayInIframe: true,
      asyncContext: event,
    },
      (asyncResult) => {
        asyncResult.value.addEventHandler(Office.EventType.DialogEventReceived,
        (processMessage) => {
          asyncResult.value.close()
          asyncResult.asyncContext.completed({ allowEvent: false })
        }
      )
    }
  )
}

popup.html

<!DOCTYPE html>
<html lang="ja">
<head>
    <title>test</title>
    <meta http-equiv="content-type" charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=Edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <script type="text/javascript" src="https://appsforoffice.microsoft.com/lib/1.1/hosted/office.js"></script>
</head>
<body>
    test
</body>
</html>

I'm creating an add-in on Outlook on the Web, and I'm seeing unexpected behavior when I test it.

Details are described below.

  1. Click "New message" on the Outlook on the web.

  2. Click "Open in new window".

  3. Wait about 10 minutes on the "new window".

  4. Compose an email. and Click the "Send" button.

  5. The process does not proceed and I cannot send an email.

  6. After about 3 minutes, the following error message is displayed.

  7. "We're sorry, we couldn't access "add-in Name". Make sure you have a network connection. If the problem continues, please try again later."

Probability and time of occurrence are irregular.

Please tell me how to solve this problem.

[2022.04.08]

index.js

/*
 * Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
 * See LICENSE in the project root for license information.
 */

var mailboxItem;

Office.initialize = function (reason) {
    mailboxItem = Office.context.mailbox.item;
}

// Entry point for Contoso Message Body Checker add-in before send is allowed.
// <param name="event">MessageSend event is automatically passed by BlockOnSend code to the function specified in the manifest.</param>
function validateBody(event) {
  Office.context.ui.displayDialogAsync(
  "https://localhost:3000/index.html",
    {
      height: 65,
      width: 40,
      displayInIframe: true,
      asyncContext: event,
    },
      (asyncResult) => {
        asyncResult.value.addEventHandler(Office.EventType.DialogEventReceived,
        (processMessage) => {
          asyncResult.value.close()
          asyncResult.asyncContext.completed({ allowEvent: false })
        }
      )
    }
  )
}

popup.html

<!DOCTYPE html>
<html lang="ja">
<head>
    <title>test</title>
    <meta http-equiv="content-type" charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=Edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <script type="text/javascript" src="https://appsforoffice.microsoft.com/lib/1.1/hosted/office.js"></script>
</head>
<body>
    test
</body>
</html>

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

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

发布评论

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

评论(1

知足的幸福 2025-01-22 22:05:00

您似乎在清单文件中指定了 ItemSend 事件,但无法找到或访问您的加载项。或者清单中指定的事件处理程序不公开。

Looks like you specified the ItemSend event in the manifest file and your add-in can't be located or reached. Or the event handler specified in the manifest isn't publicly available.

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