I'm trying to create a Google Apps Script to delete some email in bulk. The code for this doesn't really matter though as the GMailApp object isn't defined. I create a new project, add the following code:
function main() {
var threads = GMailApp.search('.....');
}
and I just get an error 'ReferenceError: GMailApp is not defined'. Do I have to enable the GMailApp? I thought the point of the app services was that they didn't need an API to be enabled, and that they can just be linked and used.
Any help appreciated,
Thanks

