1
내가 특정 드라이브 폴더에서 이메일을 저장하기 위해 노력하고있어에서 기능 hasNext를 찾을 수 없습니다. 일반적으로형식 오류 : 그러나 오류 메시지가 나는 이것을 극복 할 수있는 방법</p> <pre><code>TypeError: Cannot find function hasNext in object </code></pre> <p>어떤 생각을 점점 객체
function saveGmailToDrive() {
var gmailLabels = "SaveToDrivetest";
var driveFolder = "Emails saved by " + Session.getActiveUser().getEmail()
/* Gmail Label that contains the queue */
var label = GmailApp.getUserLabelByName(gmailLabels) ?
GmailApp.getUserLabelByName(gmailLabels) :
GmailApp.createLabel(gmailLabels);
var threads = GmailApp.search("in:" + gmailLabels, 0, 5);
if (threads.length > 0) {
/* Google Drive folder where the Files would be saved */
var folders = DriveApp.getFolderById("0B9Ug3fXvrl5HeGRddddMcE93bkE3Q1k");
var folder = folders.hasNext() ?
folders.next() :
DriveApp.createFolder(driveFolder);
}
DriveApp.getFolderById이 하나의 폴더가 아닌 반복자를 반환를 반환합니다. – ScampMichael