如何使用默认电子邮件客户端发送电子邮件? [英] How to send email using default email client?

查看:34
本文介绍了如何使用默认电子邮件客户端发送电子邮件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用系统的默认电子邮件客户端(thunderbird、Outlook 等)从 .net Windows 窗体应用程序发送电子邮件.我想预设主题和正文——我认为有一种方法可以通过向 Windows 资源管理器发送这样的内容来做到这一点:mailto:test@example.invalid?subject=mysubject&body=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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆