简体   繁体   English

使用.Net中安装的邮件客户端发送email

[英]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);

Google Chrome open Gmail result谷歌浏览器打开 Gmail 结果

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用 System.Net.Mail 在发送时唯一标识 email - Uniquely identify an email on send using System.Net.Mail 如何使用 System.Net.Mail 向多个地址发送电子邮件 - How to send email to multiple address using System.Net.Mail 通过 gmail 使用 System.Net.Mail 发送电子邮件 - Send email using System.Net.Mail through gmail 使用System.Net.Mail发送带有附件的电子邮件 - Send email with attchement using System.Net.Mail 使用标准邮件客户端和一些其他功能发送电子邮件 - Send email with standard mail client and some extras Asp.Net发送Outlook电子邮件并获取此5.7.57 SMTP客户端未通过身份验证,以在MAIL FROM期间发送匿名邮件 - Asp.Net sending outlook email and get this 5.7.57 SMTP Client was not authenticated to send anonymous mail during MAIL FROM 如何使用.net(c#)创建带有嵌入图像的HTML电子邮件并将其显示在默认邮件客户端中? - How to create HTML email with embeded image and show it in the default mail client using .net (c#)? 尝试在System.dll中使用smtp'System.Net.Mail.SmtpException'发送电子邮件时出错 - error when trying to send email using smtp 'System.Net.Mail.SmtpException' in System.dll 使用System.Net.Mail从用户的数据库列表发送电子邮件 - Using System.Net.Mail to send email from Database list of user 通过 Exchange Online (Office 365) 使用 System.Net.Mail 发送 SMTP email - Send SMTP email using System.Net.Mail via Exchange Online (Office 365)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM