[英]how to insert an attachment in a timeline using google-api-nodejs-client?
[英]How to send a mail with an attachment in gmail api using google-api-nodejs-client for nodejs
我想通過 gmail 發送帶有附件的電子郵件。
我正在為 node.js 使用 google-api-nodejs-client。
我當前的消息發送代碼是:
var gmailClass = google.gmail('v1');
gmailClass.users.messages.send({
auth: OAuth2Client,
userId: 'me',
resource: {
raw: base64EncodedEmail
},
}
,function(err, results)
{
if (!err)
{
//do something
}
else
{
//do something
}
});
有沒有辦法向發送功能添加附件?
您的附件應該在您已經使用的“原始”base64EncodedEmail 中。 格式只是一封完整的電子郵件(例如,查看 Gmail 或任何其他郵件客戶端中的“顯示原件”以查看帶有附件的電子郵件的外觀)。 我想有一些 MIME 電子郵件消息庫會有所幫助...
如果您解決此問題,請發送pls代碼? 仍然不了解如何通過js添加附件(需要chrome擴展名,但沒關系)。 謝謝)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.