0

当我尝试使用 GmailMessage 类的 getPlainBody() 方法时。当我执行以下代码时,出现错误消息“ Invalid MIME type ”。谁能帮我验证我的代码有什么问题?

function processLabel(labelName) {
  var targetLabel = GmailApp.getUserLabelByName(labelName);
  var targetThreads = targetLabel.getThreads();
  return targetThreads;
};

function getEmailPlainText() {
  var targetThreads = processLabel('@today');
  var threadsCount = targetThreads.length;
  for (var i = 0; i < threadsCount; i++) {
    var targetThread = targetThreads[i];
    var messageCount = targetThread.getMessageCount();
    var subject = targetThread.getFirstMessageSubject();
    var lastMessage = targetThread.getMessages()[messageCount-1];
    var lastMessageContent = lastMessageContent = lastMessage.getPlainBody();
};    
4

1 回答 1

0

当邮件具有某种类型的附件时,这似乎是一个错误。

在这里检查并投票

于 2014-09-16T06:24:09.503 回答