如何使用默认的电子邮件客户端发送电子邮件? [英] How to send email using default email client?
本文介绍了如何使用默认的电子邮件客户端发送电子邮件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想从.NET窗口发送邮件窗体应用程序使用系统的默认电子邮件客户端(雷鸟时,Outlook等)。我想preSET的主题和正文文本 - 我觉得有一种方法发送这样的Windows资源管理器要做到这一点:电子邮件地址:test@example.invalid主题= mysubject和放大器;身体= mymessage? 。你有什么例子说明吗?
I want to send an email from a .net windows forms application using the system's default email client (thunderbird, outlook, etc.). I'd like to preset the subject and body text -- I think there's a way to do this by sending something like this to windows explorer: "mailto:test@example.invalid?subject=mysubject&body=mymessage". Do you have any examples on this?
推荐答案
试试这个:
System.Diagnostics.Process proc = new System.Diagnostics.Process();
proc.StartInfo.FileName = "mailto:someone@somewhere.com?subject=hello&body=love my body";
proc.Start();
这篇关于如何使用默认的电子邮件客户端发送电子邮件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文