小编Ahm*_*san的帖子

如何在 Node.JS 中使用 gmail API 创建带有附件的草稿消息?

我正在使用Gmail API,需要使用附件创建新草稿,我正在遵循官方文档:https://developers.google.com/gmail/api/v1/reference/users/drafts/create


    let response2 = await gmail.users.drafts.create({
        'userId': 'me',
        'resource': {
            'message': {
                'raw': payload
            }
        }
    });
Run Code Online (Sandbox Code Playgroud)

此代码段在 Gmail 中创建草稿邮件,但无法从我的本地计算机附加该文件

enter code here我可以在哪里从本地找到附加文件的partId和零件数组

有效负载参考:https://www.any-api.com/googleapis_com/gmail/docs/Definitions/MessagePart

    let response2 = await gmail.users.drafts.create({
        'userId': 'me',
        'resource': {
            'message': {
                'raw': payload
            }
        }
    });
Run Code Online (Sandbox Code Playgroud)

javascript google-api node.js gmail-api

2
推荐指数
1
解决办法
1627
查看次数

如何拆分PHP变量

我正在寻找一种方法将字符串变量拆分为两个.举个例子,如果我有:

$activities = "In the morning we will dance, in the evening we will sing"
Run Code Online (Sandbox Code Playgroud)

我想把它拆分成,

$activities1 = "In the morning we will dance"
$activities2 = "In the evening we will sing"
Run Code Online (Sandbox Code Playgroud)

我将不胜感激任何帮助.

谢谢

php

-2
推荐指数
1
解决办法
2194
查看次数

标签 统计

gmail-api ×1

google-api ×1

javascript ×1

node.js ×1

php ×1