简体   繁体   English

用Javascript打开邮件客户端服务器端?

[英]Open mail client serverside with Javascript?

Is there a way to open a mail client serverside with javascript? 有没有办法用javascript打开邮件客户端服务器端? Im using C# and ASP.Net. 我正在使用C#和ASP.Net。 Web Application. Web应用程序。 Like a mailto: type functionality. 就像mailto:键入功能。 Like if i clicked the button it would open up outlook on my computer with the email address wanted already inputed. 就像我单击该按钮一样,它将在计算机上打开Outlook,并已输入想要的电子邮件地址。 Thanks 谢谢

You can send a Location: mailto:some@address header. 您可以发送Location: mailto:some@address标头。 Users won't like you for doing that though; 用户会不喜欢您这样做; if their mail client opens unexpectedly they'll be confused/scared/annoyed. 如果他们的邮件客户端意外打开,他们会感到困惑/害怕/烦恼。

Something of this sort: 这种东西:

<asp:Button runat="server" id="btn_email" Text="Send me an email"   OnClientClick="EmailClick" /> 

and script: 和脚本:

function EmailClick() {  
window.open("mailto:.......");  
}  

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM