如何使用MAPI发送邮件? [英] How to send a mail using MAPI?
问题描述
我想使用用户Windows计算机上的邮件客户端发送电子邮件。据我可以从网上知道,MAPI是要走的路。但是,在阅读了MSDN文档之后,我发现MAPI非常庞大,没有源代码示例。和我没有必要的99%的功能,我只是想发送电子邮件。我如何做到这一点?
I want to send an e-mail using the mail client on the user's Windows computer. As far as I can tell from the net, MAPI is the way to go. However, after reading through the MSDN documentation, I find out that MAPI is quite vast, with no source code examples. And I have no need for 99% of the features, I just want to send an e-mail. How do I do this?
我在网上找到了这里的例子,但他们似乎依赖于简单的MAPI,微软显然列为废弃:不鼓励使用简单MAPI,它可能在随后的Windows版本中被更改或不可用。所以我不想使用这些函数。
I have found examples here on SO and on the web, but they seem to rely on something called Simple MAPI, which Microsoft has apparently listed as obsolete: "The use of Simple MAPI is discouraged. It may be altered or unavailable in subsequent versions of Windows". So I don't want to use those functions.
我发现了一个很好的例子这里,但不幸的是它是为Windows CE和不完全兼容Win32 API。我设法实现从该链接的代码,直到它到它试图打开草稿文件夹,GetProps的参数不兼容的地方。有谁知道我在哪里可以找到一个类似的代码示例为PC? C ++优先。
I found a very good example here, but unfortunately it is for Windows CE and isn't fully compatible with the Win32 API. I managed to implement the code from that link until it got to where it attempts to open the drafts folder, the parameters to GetProps aren't compatible. Does anyone know where I can find a similar code example for PC? C++ prefered.
推荐答案
我已经解决了这个由我自己,在各种互联网来源的帮助。
I have solved this by my own, with the help from various internet sources.
一旦代码经过正确测试,记录,我将尝试张贴在这里供将来参考。
Once the code is properly tested & documented, I will try to post it here for future reference.
这篇关于如何使用MAPI发送邮件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!