mrnavaone

1

May 4th, 2020
69
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  function EnviarDocumentoGmail() {
  2.   var doc = DocumentApp.create('Hola, mundo!');  
  3.   doc.getBody().appendParagraph('Este documento ha sido creado en Google Apps    Script');
  4.   var url = doc.getUrl();
  5.   var email = Session.getActiveUser().getEmail();
  6.   var subject = doc.getName();
  7.   var body = 'Enlace para ver tu documento' + url;
  8.   GmailApp.sendEmail(email, subject, body);
  9. }
RAW Paste Data