【问题标题】:While sending mail a href link is not clickable in wordpress?发送邮件时,在wordpress中无法点击href链接?
【发布时间】:2012-08-28 13:45:21
【问题描述】:

在下面的代码中,当我发送邮件 href 链接显示整个 url 并且不可点击时,如下所示:- 点击以下链接: click here for confirmation 这在本地显示正确,但在服务器上显示不正确。 如果不明白我的意思,请回复。

$key = stripslashes($user->user_activation_key);

$activation_key = base64_encode($key);
$user_id_enc = base64_encode($user_id);


$siteUrl = get_site_url();
$full_Url=$siteUrl.'/test.php?user_id='.$user_id_enc.'&key='.$activation_key;
$message  = __('Click on the following link:') . "</br>\r\n";
$message .= sprintf(__('<a href="%s">click here for confirmation</a>'), $full_Url) . "\r\n";
  wp_mail($user_email, sprintf(__('[%s] Your confirmatiom'), $blogname), $message);

【问题讨论】:

标签: wordpress sendmail html-email phpmailer


【解决方案1】:

尝试使用带有http://abc.com 的链接的绝对路径。 另外,请确保该网站不是特定于网络的,例如。可以在您的工作网络内访问。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2018-02-27
    • 1970-01-01
    • 1970-01-01
    • 2021-09-30
    • 1970-01-01
    • 2013-11-15
    • 2021-06-21
    相关资源
    最近更新 更多