다음 php 코드를 사용하여 wordpress의 다른 메일 서버로 이메일을 보내고 있습니다.야후 메일의 하이퍼 링크를 클릭 할 수 없습니다.
home_url value = http://ipaddress/website/
$url= home_url()."/?page_id=309&pin=".$pin;
$to=$email;
$subject="Registration Successful ! ";
$password=rand(10000, 99999);
$mess .="<p>Dear ".$name .",</p><p></p>";
$mess .="<p>Please find link below to active your account. </p><p></p>";
$mess .="<p></p>".$url."<p></p>";
$mess .="<p><a href=' ".$url." '>".$url."</a></p><p></p>";
$mess .="<p> Thanks, </p><p></p>";
$mess .=" <p>Test Support Team </p><p></p>";
//$headers = "Content-type: text/plain; charset = ".$chrst. "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$from_name = get_bloginfo('name');
$from_email = get_option('opt_glocal_site_email');
if ($from_email) {
$headers .= 'From: '.$from_name.' <'.$from_email.'>'. "\r\n";
} else {
$headers .= 'From: '.$from_name. "\r\n";
}
$send = mail ($to, $subject, $mess, $headers);
계정 활성화 하이퍼 링크를 사용자에게 전송하지만 문제는 하이퍼 링크를 야후 메일에서 클릭 할 수 없다는 것입니다.
동일한 코드가 Gmail, hotmail에 이메일을 완벽하게 보내고 링크를 클릭하면 어느 것이 문제인지를 안내 할 수 있습니다.
링크에 대한 야후의 요소를 검사 :
<a rel="nofollow" target="_blank" onclick="return theMainWindow.showLinkWarning(this)" class="removed-link" id="yui_3_16_0_1_1411592352265_2952">http://ipaddress/website/?page_id=309</a>
** 참고 : 이미 "에 http : //"사용하고. href 속성으로 **
도움이 것 감사하겠습니다.
스팸 폴더에있는 것 같습니까? 어쨌든 나는 이것을 재 작성으로 해결 한 url'? foo '을 전에 보았습니다. 야후는 URL의 매개 변수를 좋아하지 않을 수도 있습니다. –
'home_url()'과'$ from_name'과'$ from_email'에 대한 표준 변수 치환을 사용하여 코드를 테스트하고 클릭 가능한 링크가 포함 된 이메일을 받았습니다. 뭔가 다른 원인이 아마 WordPress 자체에서 발생합니다. –
home_url 값이 실제로 http : // ipaddress/website /이고 실제로 $ url = home_url()입니다. "/? page_id = 309 & pin =". $ pin; 다음과 같은 링크를 보내십시오 : http : // ipaddress/website //? page_id = 309 & pin = ... 중간에 두 개의 슬래시가 있습니다. 야후는 그런 것을 좋아하지 않을 수 있습니다. 나는 이것이 단지 오타라고 느낀다. (무작위 간격은 하이퍼 링크로 바뀌지 않으므로) – Blizzardengle