How to send email using default email client?

前端 未结 4 1249
鱼传尺愫
鱼传尺愫 2020-11-30 08:04

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

4条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-11-30 08:31

    Try this:

        System.Diagnostics.Process proc = new System.Diagnostics.Process();
        proc.StartInfo.FileName = "mailto:someone@somewhere.com?subject=hello&body=love my body";
        proc.Start();
    

提交回复
热议问题