2015-06-01 54 views
1

如何在之前將圖像標題放在之前?你能幫我麼?將圖像放在電子郵件標題中

這是我的看法:

<body> 
<p>Hello, <?php echo $first_name; ?> <?php echo $last_name; ?></p> 

<p>Please click the link below to reset your password within 24 hours :</p> 

<p> 
<a href="<?php echo base_url(); ?>recover/response/<?php echo $secret; ?>/">Click here to reset password</a> 
</p> 

<p> 
Regards,<br> 
Customer Service. 
</p>  
</body> 
+0

你檢查過嗎? –

回答

0

試試這頭

$headers .= "MIME-Version: 1.0\r\n"; 
$headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n"; 

$to = '';//Assign your Mail 
$subject = 'Email Subject'; 

$message = '<html><body>'; 
$message .= '<img src="http://example.com/123.png" alt="Your Image" />';//Image 
$message .= '<p>Hello, <?php echo $first_name; ?> <?php echo $last_name; ?></p>'; 
$message .= '<p>Please click the link below to reset your password within 24 hours :</p>'; 
$message .= '<p><a href="<?php echo base_url(); ?>recover/response/<?php echo $secret; ?>/">Click here to reset</a></p>'; 
$message .= '<p>Regards,<br>Customer Service.</p>'; 
$message .= "</body></html>"; 

之前發送發送郵件

mail($to, $subject, $message, $headers); 
+0

在哪裏放這個代碼? –

+0

你上傳的查看哪些發給客戶? –

+0

是這個電子郵件給客戶 –