我在使用 css 和 php 邮件功能时遇到问题,我无法弄清楚为什么样式表的某些部分不起作用。
这是我的 php 函数,它将电子邮件发送给用户:
<?php
require 'dbconnection.php';
//Testing variables
$name = "laerte";
$email = "someemail@gmail.com";
$title = "Some Project";
$desc = " Some description";
//adds project to MYSQL database
//The function returns uniqid generated
$id = addProject($title,$desc,$name);
$subject = "Project: ".$title;
$header = 'MIME-Version: 1.0' . "\r\n";
$header .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$header .= "From: pixelgraphy.net";
$message = "<html>
<head>
<style>
body
{
width: 700px;
height: auto;
}
h1
{
background-color: blue;
color:white;
margin-top: …Run Code Online (Sandbox Code Playgroud)