通过 Java(或 C#)发送 MAPI 电子邮件
我有一个 java 程序,当前使用 SMTP 发送一些电子邮件。我有一位客户的公司网络被锁定,只允许通过 MAPI1 和 MAPI4 协议发送电子邮件。
在互联网上浏览后,我找不到任何从 Java 程序发送 MAPI 电子邮件的示例。如果我们必须为某些 3rd 方组件付费,这并不是世界末日,但免费显然更好:)
另一点需要补充的是,如果在 C# 中该任务要容易得多,那么就有可能创建发送电子邮件功能在 C# 中并从 Java 主应用程序调用 C# 程序。
如果您需要更多信息,请告诉我。
I have a java program that sends some emails currently using SMTP. I have a customer whose corporate network is locked down and only allows sending of emails via the MAPI1 and MAPI4 protocols.
After looking around on the internet I have been unable to find any examples of sending an MAPI email from a Java program. If we have to pay for some 3rd party component its not the end of the world, but free is obviously better :)
Another point to add is that if the task is much easier in C# then there is the possibility of creating the send email functionality in C# and calling the C# program from the Java main application.
Please let me know if you require anymore information.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
以下所有内容都可以从 Java 通过 MAPI 发送邮件:
您通常需要本地计算机上的 MAPI COM 组件,并且始终需要 MAPI 连接的凭据/兑换账号!
由于我不确定您所说的 MAPI4 与 MAPI1 是什么意思,我怀疑您可能指的是 IMAP(协议有 V 4),它与 MAPI 有很大不同 - 以防万一以下是 Java IMAP 选项:
All of the following can send mails via MAPI from Java:
You will usually need the MAPI COM components on the local machine and always the credentials for the MAPI connection/Exchange account!
Since I am not sure what you mean by MAPI4 versus MAPI1 I suspect that you might mean IMAP (there is a V 4 of the protocol) which is quite different from MAPI - just in case the following are Java options for IMAP:
看看 JMapi 库,它只适用于 Windows 机器,但应该做你想做的事情......
Take a look at the JMapi library, it only works on windows machines but should do what you want ...