[英]Send email using the installed mail client in .Net
How can I send an email without attachments using the default email client installed on Windows 10/8/7.如何使用安装在 Windows 10/8/7 上的默认 email 客户端发送不带附件的 email。
I tried the following code but it is just opening a blank page in the Chrome browser.我尝试了以下代码,但它只是在 Chrome 浏览器中打开一个空白页面。
var url = "mailto:someone@somewhere.com?subject=Test&body=Hello";
System.Diagnostics.Process.Start(url);
I can fix it by changing the Default mail client from Google Chrome to MS Outlook, but shouldn't the Google Chrome smartly open Gmail?我可以通过将默认邮件客户端从 Google Chrome 更改为 MS Outlook 来修复它,但 Google Chrome 不应该巧妙地打开 Gmail 吗?
try this answer Mailto links do nothing in Chrome but work in Firefox?试试这个答案Mailto 链接在 Chrome 中什么都不做,但在 Firefox 中工作?
var url = "mailto:someone@somewhere.com?subject=Test&body=Hello";
System.Diagnostics.Process.Start(@"path\chrome.exe",url);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.