首页 > 解决方案 > WordPress 电子邮件共享按钮未在 Outlook 中打开

问题描述

我的 single.php 文件中有一个自定义共享按钮片段。它适用于其他电子邮件应用程序,但不适用于 Microsoft Outlook。有任何想法吗?

<a class="btn btn-mail" href="mailto:?subject=<?php print(urlencode(the_title())); ?>&body=Check out this article: <?php print(urlencode(get_permalink())); ?>"> BUTTON HERE </a>

标签: phpwordpresswordpress-themingshare

解决方案


我看到了,您错过了添加收件人电子邮件地址。代码应该是

<a class="btn btn-mail" href="mailto:someone@example.com?subject=<?php print(urlencode(the_title())); ?>&body=Check out this article: <?php print(urlencode(get_permalink())); ?>"> BUTTON HERE </a>

试试这个然后让我知道结果。


推荐阅读