Php 谷歌GMail Api发送了一封电子邮件,但删除了一些html

Php 谷歌GMail Api发送了一封电子邮件,但删除了一些html,php,google-api,gmail-api,Php,Google Api,Gmail Api,您好,我正在通过PHP中的google GMail API发送一封电子邮件,如下所示: $strRawMessage = "From: Name <good@email.com>\r\n"; $strRawMessage .= "To: Another Name <anothergood@email.com>\r\n"; $strRawMessage .= 'Subject: =?utf-8?B?' . base64_encode('Subject') . "?=\r\n

您好,我正在通过PHP中的google GMail API发送一封电子邮件,如下所示:

$strRawMessage = "From: Name <good@email.com>\r\n";
$strRawMessage .= "To: Another Name <anothergood@email.com>\r\n";
$strRawMessage .= 'Subject: =?utf-8?B?' . base64_encode('Subject') . "?=\r\n";
$strRawMessage .= "MIME-Version: 1.0\r\n";
$strRawMessage .= "Content-Type: text/html; charset=utf-8\r\n";
$strRawMessage .= 'Content-Transfer-Encoding: quoted-printable' . "\r\n\r\n";
$strRawMessage .= 'Content<img src="http://example.com/img.jpg">';
$strRawMessage .= "\r\n";

$mime = rtrim(strtr(base64_encode($strRawMessage), '+/', '-_'), '=');

$msg = new Google_Service_Gmail_Message;
$msg->setRaw($mime);
$response = $service->users_messages->send($userId, $msg);

但我从未使用过mx.example.com,我不知道10.174.34.83 ip地址


GMail将我的
标签更改为
,这样它就会破坏代码。知道为什么会发生这种情况吗?

问题是谷歌默认会阻止外部图像。问题是谷歌默认会阻止外部图像。
Received: from 610088504391 named unknown by gmailapi.google.com with HTTPREST; Wed, 15 Feb 2017 12:17:37 -0800
Received: from mx.example.com (unresolved [10.174.34.83]:35438)
by ps8 (Ota) with LMTP id 1C2A929C5BB61