How to simulate a “mailto:” call on Winforms Button Click?

后端 未结 2 1137
旧巷少年郎
旧巷少年郎 2021-02-12 12:46

I will send an email with a given address by open the standard email program like \"mailto:\" in an a-tag will do it, but within a button click.

How?

2条回答
  •  感情败类
    2021-02-12 13:29

    Example from here

    private void btnEmail_Click(object sender, EventArgs e)  
    { 
       string command = "mailto:info[at]codegain.com?subject=The Subject&bcc=vrrave[at]codegaim.com";  
       Process.Start(command); 
    }
    

提交回复
热议问题