小编Lae*_*eto的帖子

在 PHP 中使用带有 mail() 函数的 CSS

我在使用 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)

html css php email

3
推荐指数
1
解决办法
5282
查看次数

标签 统计

css ×1

email ×1

html ×1

php ×1