Javascript 可以在PHP的邮件函数中添加CSS吗?
我想在此代码中添加一些邮件函数中的css:Javascript 可以在PHP的邮件函数中添加CSS吗?,javascript,php,css,function,email,Javascript,Php,Css,Function,Email,我想在此代码中添加一些邮件函数中的css: $text .= "<h1>Confirmation Code</h1>"; $text .= "<img src='https://pbs.twimg.com/profile_images/587949417577066499/3uCD4xxY_400x400.jpg'></img>"; $text .= "<h3>This is your
$text .= "<h1>Confirmation Code</h1>";
$text .= "<img src='https://pbs.twimg.com/profile_images/587949417577066499/3uCD4xxY_400x400.jpg'></img>";
$text .= "<h3>This is your confirmation code. Enter it into the text box in World Web. Here is the code: '".$_REQUEST['random_num']."'</h3>";
$text .= "<h4>Thank you for working with WWW. We appreciate the help!</h4>";
$text .= "</body></html>";
$subject = "Confirmation Code";
$headers = "MIME-Version: 1.0" . "\r\n";
$headers .= "Content-type:text/html;charset=UTF-8" . "\r\n";
$to = $_REQUEST['email'];
mail($to, $subject, $text, $headers);
或:
它出错了。有人知道如何在php中将css添加到邮件函数中吗?因为您没有在
“
中转义”
尝试:
$text.=“确认码”;
//或
$text.=“确认码”;
style="color: red;"
style="background-color: blue;"