我有一个简单的 php 电子邮件脚本,我希望在底部包含一个图像。当我添加像下面这样的图像标签时,电子邮件只会显示<img src="http://domain.com/images/logo.png" />
而不是实际图像。任何想法为什么?
<?PHP
$email = $_POST["emailaddress"];
$to = "you@youremail.com";
$subject = "New Email Address for Mailing List";
$headers = "From: $email\n";
$headers .= "Content-type: text/html\r\n";
$message = "A visitor to your site has sent the following email address to be added to your mailing list.\n
Email Address: $email";
$user = "$email";
$usersubject = "Thank You";
$userheaders = "From: info@domain.com\n";
$usermessage =
"
Thank you for joining our mailing list.
We hope to see you very soon!
Address 1
Address 2
<img src=\"http://domain.com/images/logo.png\" />
";
mail($to,$subject,$message,$headers);
mail($user,$usersubject,$usermessage,$userheaders);
$fh = fopen("email.xml", "a");
fwrite($fh, "$email\r\n");
fclose($fh);
?>