打开默认电子邮件客户端
我整天都在尝试找到可以启动带有附件的默认电子邮件系统的代码,但我没有成功。我的应用程序用Python编写,并在Windows上运行。我没有在这篇文章中与Python一起成功 python:python:python:系统所以,我在此帖子中尝试了c# open默认邮件客户端以及附件以及我在Internet上发现的其他一些信息。在这篇文章中,以下代码行:
var mailWriter = mailWriterContructor.Invoke(new object[] { filestream });
提出错误:
System.NullReferenceException: 'Object reference not set to an instance of an object.'
我找到了使用start-process mailto的解决方案:...它打开了默认的电子邮件系统,忽略了附件参数,这是我在此处使用的代码:
C:\SomeDir> Start-Process "mailto:[email protected]?subject=an email&body=see attachment&attachment='cost example.xlsx'"
默认电子邮件如果这很重要,则系统是雷鸟。我将继续寻找解决方案。欢迎任何主意。谢谢。
I've been all day trying to find code that would allow me to launch the default email system with an attachment but I did not succeed. My app is written in python, and runs on windows. I did not succed with python with this post Python: launch default mail client on the system so, I tried with C# with this Post Open default mail client along with a attachment and some other information I found on the Internet. In this post the following line of code:
var mailWriter = mailWriterContructor.Invoke(new object[] { filestream });
raises an Error:
System.NullReferenceException: 'Object reference not set to an instance of an object.'
I found the solution with Start-Process mailto:... and it opens the default email system with the attachment argument ignored, this is the code I use here:
C:\SomeDir> Start-Process "mailto:[email protected]?subject=an email&body=see attachment&attachment='cost example.xlsx'"
The default email System is Thunderbird if that matters. I will keep searching for a solution. Any idea is welcome. Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论