Windows Live Mail Mapi 支持

发布于 2024-09-14 02:28:08 字数 1030 浏览 1 评论 0原文

我正在编写需要使用 MAPI 发送电子邮件的 ac# .net 应用程序。我正在使用以下库来实现此 http://www.codeproject.com/KB /IP/SendFileToNET.aspx 这是我如何使用它的示例。

MAPI mapi = new MAPI();
mapi.AddRecipientTo("[email protected]");
int returncode = mapi.SendMailPopup("subject", "message");
if(returncode==0)
{
MessageBox.Show("User sent message");
}
else if (returncode==1)
{
MessageBox.Show("User abort");
 }

这段代码在默认邮件程序上打开一个新消息对话框,如果用户决定发送或中止发送电子邮件,则应显示该对话框。

此代码在使用 Outlook 时工作正常,这意味着如果用户决定不通过关闭消息对话框来发送消息,它会弹出一个新的电子邮件对话框并返回正确的错误代码。

问题是,当使用 Windows 邮件时,此功能无法正常工作。发送邮件对话框正确打开,并且应用程序暂停其在 mapi.SendMailPopup 上的执行,直到邮件对话框关闭。然而,无论用户做什么,mapi.SendMailPopup 总是返回零。例如,如果用户决定关闭消息对话框而不发送消息,则当正确响应为 1(用户中止)时,mapi.SendMailPopup 返回 0。

我的问题是 Windows Live Mail 是否需要 MAPI 支持,如果没有,有人可以告诉我其他一些免费的 Windows 邮件客户端,可以提供所需的 MAPI 支持

I am writing a c# .net application that needs to send email messages using MAPI. I am using the following library to achieve this http://www.codeproject.com/KB/IP/SendFileToNET.aspx
Here is an example how I use it.

MAPI mapi = new MAPI();
mapi.AddRecipientTo("[email protected]");
int returncode = mapi.SendMailPopup("subject", "message");
if(returncode==0)
{
MessageBox.Show("User sent message");
}
else if (returncode==1)
{
MessageBox.Show("User abort");
 }

This piece of code opens a new message dialog on default mail program and should display if user decided to send or abort sending the email.

This code works fine when using Outlook meaning that it popups a new email dialog and returns the correct error code if user for example decides not to send the message by closing the message dialog.

The problem is that when using windows mail this does not work correctly. The send mail dialog opens correctly and the application pauses its execution on mapi.SendMailPopup until the mail dialog is closed. However no matter what the user does the mapi.SendMailPopup always return zero. If user would for example decide to close the message dialog without sending the message the mapi.SendMailPopup returns 0 when the correct response would be 1(user abort).

My question is should windows live mail have required MAPI-support for this, and if no can someone tell me some other free windows mail client that would offer the required MAPI-support

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

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

发布评论

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

评论(1

淡莣 2024-09-21 02:28:08

这很令人困惑——.NET 解决方案是 SMAPI,而不是 MAPI。我不确定 SMAPI 的返回值有多可靠,特别是因为返回值是直接从默认 MUA 供应商的 SMAPI 实现返回的,而且至少有十几个。由于浏览器不使用返回值,并且它们是 SMAPI 的主要客户端,因此我不会依赖它。

This is confusing-- that .NET solution is SMAPI, not MAPI. I'm not sure how reliable the return values from SMAPI are, especially since the return value is returned directly from your default MUA vendor's implementation of SMAPI, and there are at least a dozen of them out there. Since the browser doesn't use the return value, and they're the principal clients of SMAPI, I wouldn't rely on it.

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