GMAIL API - 电子邮件弹跳,没有特定错误

时间:2017-09-21 09:26:32

标签: php gmail-api

我通过 PHP 使用 Gmail API

我正在发送消息,然后他们反弹:

  

“发生错误。未发送电子邮件。”

但它没有提到错误。

我该如何调试这种情况?

我认为问题出现在我自己的信息中。

From: =?utf-8?B?VGF0aWFuYSBUb3JyZXMgTW9udGVybw==?= <...@gmail.com>
To: <...@gmail.com>
Subject: =?utf-8?B?TUlSQU1JUEVORQ==?=
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="_Part_150598468959c380b160a341.92104241"
--_Part_150598468959c380b160a341.92104241
Content-Type: multipart/alternative; boundary="_Part2_150598468959c380b160a514.30698822"
--_Part2_150598468959c380b160a514.30698822
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: base64
VHJhbmNhcyB5IGJhcnJhbmNhcyZyYXF1bzsgRW52aWFkbyBkZXNkZSBub21icmVBcHBhRGVjaWRpcg==
--_Part2_150598468959c380b160a514.30698822
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: base64
HDYd...
--_Part2_150598468959c380b160a514.30698822--
--_Part_150598468959c380b160a341.92104241
Content-Transfer-Encoding: base64
Content-Type: {image/jpeg}; name=una-imagen-adjunta.png;
Content-Disposition: attachment; filename=una-imagen-adjunta.png;
HGstdfwcy...
--

我尝试转移编码 文字 html 部分 7bit 8bit 也是。但是它们都没有工作,我更喜欢 base64 所以我坚持使用它。

发送后的Gmail API答案

object(Google_Service_Gmail_Message)#56 (14) { ["collection_key":protected]=> string(8) "labelIds" ["historyId"]=> NULL ["id"]=> string(16) "15ea3bd3e05c8509" ["internalDate"]=> NULL ["labelIds"]=> array(1) { [0]=> string(4) "SENT" } ["payloadType":protected]=> string(32) "Google_Service_Gmail_MessagePart" ["payloadDataType":protected]=> string(0) "" ["raw"]=> NULL ["sizeEstimate"]=> NULL ["snippet"]=> NULL ["threadId"]=> string(16) "15ea3bd3e05c8509" ["internal_gapi_mappings":protected]=> array(0) { } ["modelData":protected]=> array(0) { } ["processed":protected]=> array(0) { } }

注意:我可以看到已发送文件夹中的邮件,包含正确的正文和附件。

enter image description here

反弹:

enter image description here

英文:未发送电子邮件。错误。

我不知道如何找到这个错误的原因,甚至不知道从哪里开始。

注意:我的API配额没问题,我甚至不使用每日配额的5%。

谢谢。

0 个答案:

没有答案
相关问题