替代“mailTo”;打开客户电子邮件? [英] Alternative to "mailTo" for opening client email?

查看:236
本文介绍了替代“mailTo”;打开客户电子邮件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



我在下面的代码中使用通过超链接打开客户端电子邮件,但是如果我添加附件到它,它将无法正常工作,因为我用Google搜索并找到附件在这里不起作用。我需要替代方法来打开客户端电子邮件并添加附件。请帮帮我们。



Hi All,

I used below code for opening Client Email through hyperlink, but if I add Attachment to this it would not work as I have googled and found out that Attachment does not work here. I need alternative to this for opening Client Email plus adding attachment to it. Please help guys.

hyperlinkSendmail.NavigateUrl = "mailTo:" + EmailAddress + "?subject=" + Common.MAIL_SUBJECT + "?Attachment=" + FileRef;

推荐答案

mailto:// 是唯一可以打开客户端本地邮件应用程序的协议...所有其他方法将需要一些额外的代码(插件)......

准确地说 mailto:// 协议不支持附件...( https://www.ietf.org/rfc/rfc2368.txt [ ^ ]),甚至有些浏览器也支持它...这也是一个很大的问题怎么办你知道什么文件 - 来自客户端计算机 - 你想附上?!你怎么知道路径?!

如果你有一个复杂的邮件场景(而不是一些简单的文本到地址),最好创建一个特定的邮件表格并发送邮件来自服务器使用 System.Net.Mail [ ^ ] ...
mailto:// is the only protocol that enables opening the client's local mail application...All the other approaches will need some additional code (plugin)...
To be precise the mailto:// protocol does not support attachments... (https://www.ietf.org/rfc/rfc2368.txt[^]), even some browsers do support it... It is also a big question how do you know what file - from the client computer - you want to attach?! How do you know the path?!
If you have a complex scenario of mail (and not some simple-text-to-address) it is better to create a specific mail form and send the mail from the server using System.Net.Mail[^]...


这可能对你有帮助..



带附件的邮件 [ ^ ]



以编程方式向电子邮件添加附件 [ ^ ]
this might help you..

Mail with Attachment[^]

Programmatically adding attachments to emails[^]


这篇关于替代“mailTo”;打开客户电子邮件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆