我想发送一个包含CSS样式表的
HTML页面到一个电子邮件帐户.问题是CSS样式表根本看不到.我必须内联CSS样式吗?这似乎是非常低效的方法.任何其他想法?
原文链接:https://www.f2er.com/php/140220.html<?PHP $to = "myaccount@gmail.com"; // subject $subject = "Test mail"; // message $message = file_get_contents("index.html"); // from $from = "myaccount@gmail.com"; // To send HTML mail,the Content-type header must be set $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; // Additional headers $headers .= "From:" . $from; // Mail it mail($to,$subject,$message,$headers); echo "Mail Sent."; ?>
我非常感谢你的帮助.提前致谢.