如何在mailto正文中传递URL [英] How to pass an URL in mailto's body

查看:122
本文介绍了如何在mailto正文中传递URL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要在正文中发送网站的URL,以便邮件收件人可以单击它以加入我的网站.

I need to send an URL of my site in the body so the mail recipient can click on that to join my site.

但是,当前的邮件客户端以如下方式呈现邮件:

However currently mail client renders the mail like this:

链接在此处 http://www.example.com/foo.php?this= a

URL在& 符号上被截断,因此整个加入过程失败.如何传递类似 http://www.example.邮件正文中的com/foo.php?this = a& join = abc& user454 吗?

The URL is truncated on the & symbol, thus the whole process of joining failed. How can I pass the URL like http://www.example.com/foo.php?this=a&join=abc&user454 in mailto body?

我当前的HTML如下:

My current HTML is the following:

<a href="mailto:test@test.test?body=Link goes here http://www.example.com/foo.php?this=a&amp;really=long&amp;url=with&amp;lots=and&amp;lots=and&amp;lots=of&prameters=on_it
">Link text goes here</a>

推荐答案

您需要对URL进行编码.这个 URL解码器/编码器工具可以解决这个问题.以下似乎可以正常工作:

You need to encode the URL. This URL Decoder/Encoder tool will do the trick. The following seems to work:

<a href="mailto:test@test.test?body=Link goes here http%3A%2F%2Fwww.example.com%2Ffoo.php%3Fthis%3Da%26join%3Dabc%26user454
">Link text goes here</a>

这篇关于如何在mailto正文中传递URL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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