0

您好我正在尝试通过电子邮件发送整个网页。我在 Mac 的 Mail.app 中收到它,我可以看到它。但是当我在 gmail 或 hotmail 中看到它时,它没有得到样式

我怎样才能正确地做到这一点。或者如何将网页转换为 PDF 或 PNG 并通过 Mail 发送[我无法在服务器上安装任何东西]

编辑:它发送所有信息但没有样式

我的代码:

$mail = $_POST['mail'];

    if(($Content = file_get_contents("http://google.com")) === false) {
        $Content = "";
    }

    $Headers  = "MIME-Version: 1.0\n";
    $Headers .= "Content-type: text/html; charset=iso-8859-1\n";
    $Headers .= "From: a@a.com <a@a.com>\n";
    $Headers .= "Reply-To: a@a.com\n";
    $Headers .= "X-Sender: <a@a.com>\n";
    $Headers .= "X-Mailer: PHP\n"; 
    $Headers .= "X-Priority: 1\n"; 
    $Headers .= "Return-Path: <a@a.com>\n";  

    if(mail($mail, $subject, $Content, $Headers) == false) {
        //Error
    }

谢谢

4

1 回答 1

1

删除所有外部样式表。页面上的所有样式都应内联或在页面内定义

于 2013-02-22T07:37:10.810 回答