/* Script per ricevere un'e-mail via SMS http://www.ilsoftware.it/articoli.asp?tag=Script-Gmail-automatizzare-la-gestione-della-posta-elettronica_10436 autore: Michele Nasi, www.ilsoftware.it */ function sendText() { var label = GmailApp.getUserLabelByName('Invia SMS'); var threads = label.getThreads(); var now = new Date().getTime(); for (var i = 0; i < threads.length; i++) { var messages = threads[i].getMessages(); var dlastmessage = threads[i].getLastMessageDate(); for(var j = 0;j]*>/g, ''); body = body.trim(); body = body.substr(0,300); CalendarApp.createEvent(body, new Date(now+60000), new Date(now+60000)).addSmsReminder(0); } } } label.removeFromThreads(threads); }