发送邮件时,在wordpress中无法点击href链接?

时间:2012-08-28 13:45:22

标签: wordpress wordpress-plugin sendmail html-email phpmailer

在下面的代码中,当我发送邮件href链接显示整个网址而不是可点击时,它显示如下: - 点击以下链接: 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);

1 个答案:

答案 0 :(得分:0)

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

相关问题