2016-04-12 83 views
-3

我有我的邮件功能代码belove。Html在PHP邮件功能

$subject = "Account Expiration"; 
$headers = 'MIME-Version: 1.0'.PHP_EOL; 
$headers .= 'Content-type: text/html; charset=iso-8859-1'.PHP_EOL; 
$headers .= 'From: '.$from . ''.PHP_EOL ; 
$headers .= 'Reply-To: '.$from .''.PHP_EOL; 

$message = "<html><body>"; 
$message .= "<h1 style='color:#f40;'>Account Expiry</h1>";    
$message .= "<p style='color:#f40;font-size:18px;'>Your Account is get xpired.You can not able to bid more.For Further Bidding Please Sigunup on Our sight.</p>"; 
      $message .= '<p><a href ="'.$url.'" style="color:#07c;font-size:16px;">click here for signup</a></p>';    
      $message .= "</body></html>"; 

电子邮件已发送,但<a href=""></a>标记在邮件中不起作用。

+2

你在哪里设置$ url变量的值? –

+0

“不工作”不是有用的信息。我们需要比这更多的细节。 –

回答

0
$message = "<html> 
      <body> 
       <h1 style='color:#f40;'>Account Expiry</h1> 
       <p style='color:#f40;font-size:18px;'> 
        Your Account is get expired.You can not able to bid more.For Further Bidding Please Sigunup on Our sight. 
       </p> 
       <p> 
        <a href ='". $url ."' style='color:#07c;font-size:16px;' target='_blank'>click here for signup</a> 
       </p> 
      </body> 
     </html>"; 
0
$url="https://www.google.co.in"; 
$message = '<p><a href ="'.$url.'" style="color:#07c; 
font-size:16px;">click here for signup</a></p>'; 
echo $message ;