我的C#应用程序需要通过电子邮件从用户的机器问题报告给支持技术。没有共同的SMTP服务器可用,所以我不认为我可以使用System.Net.Mail;而不是消息必须使用用户自己的电子邮件程序和客户发送。我可以使用办公自动化启动Outlook和撰写邮件。但是,如果用户没有使用什么前景?是否有支持多个电子邮件客户端的任何更通用的机制?或者是有一个知道如何检测和调用各种客户端库?
编辑:因为这提交问题报告,我需要包括附件或(在最坏的情况)长的消息体...
解决方案 的Process.Start(电子邮件地址:hurr@durr.com);
借助的Process.Start 方法手关闭的操作系统执行一个特定指令的责任。 Windows将识别的mailto 方案和劳克相应的邮件客户端。这是使用默认程序的配置。
My C# application needs to email problem reports from the user's machine to a support tech. There is no common SMTP server available, so I don't think I can use System.Net.Mail; instead the message must be sent using the user's own email program and account. I could use office automation to launch outlook and compose a message. But what if the user is not using outlook? Is there any more general mechanism that is supported by multiple email clients? Or is there a library that knows how to detect and invoke various clients?
EDIT: as this for submitting problem reports, I need to include attachments or (at worst) a long message body...
解决方案Process.Start("mailto:hurr@durr.com");
The Process.Start method hands off to the operating system the responsibility of executing a particular instruction. Windows will recognize the mailto scheme and lauch the appropriate mail client. This is configured using Default Programs.
上一篇:如何取消Android的发布过程?过程、Android
下一篇:有没有像类SqlFileStream与SQL Server 2005的作品?作品、SQL、SqlFileStream、Server