Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/79.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
使用php mail的电子邮件中未显示图像_Php_Html_Email_Html Email - Fatal编程技术网

使用php mail的电子邮件中未显示图像

使用php mail的电子邮件中未显示图像,php,html,email,html-email,Php,Html,Email,Html Email,我试图发送电子邮件使用php代码邮件是工作文件,但图像没有进入邮件。图像src路径带有编码字符串,如下所示 <img style="width:100%" src="https://ci6.googleusercontent.com/proxy/NT6fQckS1LLRnuTUJnW0Fp2qUujk_Cpv9kV1hwoKQADwL8XU7fo4=s0-d-e1-ft#http://header.png" class="CToWUd a6T" tabindex="0"> <

我试图发送电子邮件使用php代码邮件是工作文件,但图像没有进入邮件。图像src路径带有编码字符串,如下所示

<img style="width:100%" src="https://ci6.googleusercontent.com/proxy/NT6fQckS1LLRnuTUJnW0Fp2qUujk_Cpv9kV1hwoKQADwL8XU7fo4=s0-d-e1-ft#http://header.png" class="CToWUd a6T" tabindex="0">

<?php
        $to = $_REQUEST['email'];
        $subject = 'Winning prize';
        $email_id =  'info@sample.com';
        $headers = "From: " . strip_tags($email_id) . "\r\n";
        $headers .= "Reply-To: " . strip_tags($email_id) . "\r\n";
        $headers .= "CC: satishv@sample.com";
        $headers .= "MIME-Version: 1.0\r\n";
        $headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";
      $message = '<html>
       <head>
          <title></title>
       </head>
       <body>
          <div style="border:1px solid #e96000; width: 600px;">
          <table style="color: #777;font-family: sans-serif;" width="600">
             <tr>
                <td style="padding:0px 0">
                   <img style="width: 100%;" src="header.png">
                </td>
             </tr>
             <tr>
                <td><span style="font-family: sans-serif;">Hey</span><span style="font-family: sans-serif;margin-left: 5px;">'.$address['customer_name'].'!,</span></td>
             </tr>
             <tr>
                <td style="padding:20px 0 0 20px"><span style="font-family: sans-serif;">Congratualtion! The product is Yours.</span></td>
             </tr>

          </table>
          <table style="color: #777;font-family: sans-serif;text-align: center;" width="600">   
             <tr>
                <td colspan="4" style="padding: 30px 0;border-top: 1px solid #e96000;border-bottom: 1px solid #e96000;"><span>Once Your Package ships we will send your a tracking number Once Your Package ships we will send your a tracking number Once Your Package ships we will send your a tracking number </span></td>
             </tr>
          </table>
       </div>
       </body>
    </html>';
        $result = mail($to, $subject, $message, $headers);

?>


上面的代码是工作文件,只是图像没有进入邮件

大多数电子邮件客户端阻止图像。但是,您仍然可以显示图像。您必须使用绝对图像源URL。例如

<img style="width: 100%;" src="header.png">

改为

<img style="width: 100%;" src="http://www.YourSite.com/header.png">


请确保路径中存在图像。

请提供更多信息显示完整的邮件代码,以及您将在何处附加imgImage src path not coming,这是我提供的。如何删除此编码字符串。