我在新窗口中发送电子邮件时遇到错误
我正在 Outlook 网页版上创建一个加载项,但在测试它时发现了意外行为。
详细内容如下所述。
在 Outlook 网页版上单击“新邮件”。
点击“在新窗口中打开”。
在“新窗口”上等待大约 10 分钟。
撰写电子邮件。然后单击“发送”按钮。
该过程无法继续,我无法发送电子邮件。
大约 3 分钟后,显示以下错误消息。
“很抱歉,我们无法访问“加载项名称”。请确保您有网络连接。如果问题仍然存在,请稍后重试。”
发生的概率和时间是不规则的。
请告诉我如何解决这个问题。
[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.
Click "New message" on the Outlook on the web.
Click "Open in new window".
Wait about 10 minutes on the "new window".
Compose an email. and Click the "Send" button.
The process does not proceed and I cannot send an email.
After about 3 minutes, the following error message is displayed.
"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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您似乎在清单文件中指定了
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.