在gmail中无法点击超链接

时间:2022-11-15 07:51:37

I tried to put a HTML hyperlink like this

我试着像这样放一个HTML超链接

<a href="test-app://param=123">Click here</a>

in my HTML email template and sent it using java mail library. When I open that email in my gmail, it displays "Click here" but the link is not clickable. It's just <a>Click here</a> (the part "href="test-app://param=123" is removed). It works well when I replace the link in href by the links like www.google.com.

Please help

在我的HTML电子邮件模板中,并使用java邮件库发送它。当我在我的Gmail中打开该电子邮件时,它会显示“单击此处”,但该链接无法点击。它只是点击这里(部分“href =”test-app:// param = 123“已删除)。当我用www.google等链接替换href中的链接时效果很好。 com。请帮忙

2 个解决方案

#1


1  

You should define your own schema in the AppManifest.

您应该在AppManifest中定义自己的架构。

Take a look here:

看看这里:

Hyperlinks with non HTTP schema in GMAIL

GMAIL中具有非HTTP架构的超链接

#2


0  

I had this issue and in my case I hadn't explicitly given the protocol so I just added http://to all my urls and it worked fine after that. In your example your url looks strange too though.

我有这个问题,在我的情况下,我没有明确给出协议,所以我只是将http://添加到我的所有网址,之后它运行良好。在您的示例中,您的网址看起来也很奇怪。

I would imagine you would have to have something like

我想你会有类似的东西

<a href="http://test-app?param=123">Click here</a>

#1


1  

You should define your own schema in the AppManifest.

您应该在AppManifest中定义自己的架构。

Take a look here:

看看这里:

Hyperlinks with non HTTP schema in GMAIL

GMAIL中具有非HTTP架构的超链接

#2


0  

I had this issue and in my case I hadn't explicitly given the protocol so I just added http://to all my urls and it worked fine after that. In your example your url looks strange too though.

我有这个问题,在我的情况下,我没有明确给出协议,所以我只是将http://添加到我的所有网址,之后它运行良好。在您的示例中,您的网址看起来也很奇怪。

I would imagine you would have to have something like

我想你会有类似的东西

<a href="http://test-app?param=123">Click here</a>