小编lik*_*boo的帖子

电子邮件中的Base64图像,不会显示在谷歌邮件中

我创建了一个base64图像,通过电子邮件发送给移动设备上的客户.它在电子邮件应用程序中工作,但gmail应用程序显示丢失的图像

这只是谷歌邮件阻止数据图像的安全吗?也没有显示图像的按钮

码:

    $headers = "From: info@mydomain.com\r\n";
    $headers .= "Reply-To: info@mydomain.com\r\n";
    $headers .= "MIME-Version: 1.0\r\n";
    $headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";

$imagedata = file_get_contents("http://www.barcodesinc.com/generator/image.php? code=12345&style=68&type=C128B&width=180&height=70&xres=1&font=1"); $base64 = base64_encode($imagedata); $message ="<img src='data:image/png;base64,$base64'>"; mail($to,$subject,$message,$headers);</pre>
Run Code Online (Sandbox Code Playgroud)

email gmail base64

9
推荐指数
1
解决办法
1万
查看次数

标签 统计

base64 ×1

email ×1

gmail ×1