SHARE
TWEET

Untitled

a guest Jun 17th, 2019 46 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function main() {
  2.   var ui = SpreadsheetApp.getUi();
  3.   var okienko = ui.prompt('Okno', 'Podaj tresc maila', ui.ButtonSet.OK_CANCEL);
  4.   var wiadomosc = okienko.getResponseText();
  5.   var akceptacja = okienko.getSelectedButton();
  6.  
  7.   if (akceptacja != ui.Button.OK)
  8.   {
  9.      ui.alert('Anulowales wysylanie wiadomosci');
  10.     }
  11.  
  12.   else
  13.   {
  14.     var n = 8;
  15.     var arkusz = SpreadsheetApp.getActiveSheet();
  16.     var zakres = arkusz.getRange(2, 2, n, 1);
  17.     var data = zakres.getValues();
  18.     var temat = "Temat wiadomosci";
  19.     for (i in data)
  20.     {
  21.       var wiersz = data[i];
  22.       var address = wiersz[0];
  23.       GmailApp.sendEmail(address, temat, wiadomosc);
  24.     }
  25.   }
  26.  
  27. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top