0

I am using the app script gsender library to send an email. What are the properties of the object passed to the doPost function? Where do I find the documentation of gsender?

function doPost(e)
{
  return gsender.sendGmail(e) ;
}

I am using cURL to POST to the google app script web app URL. I am setting the email, subject and body properties. Where to find a list of all the properties? For example, how to attach files to the sent email.

    $url = "https://script.google.com/macros/s/AwwwwwwIssssssssssddddddds8/exec";
    $ch = curl_init($url) ;
    curl_setopt_array($ch, [
      CURLOPT_RETURNTRANSFER => true, 
      CURLOPT_FOLLOWLOCATION => true, 
      CURLOPT_POSTFIELDS => http_build_query([
        "recipient" => $_POST['email'],
        "subject" => $_POST['subject'],
        "body" => $_POST['body']
      ])
    ]) ;
    $result = curl_exec($ch) ;

RockBoro
  • 2,163
  • 2
  • 18
  • 34
  • 2
    Documentation for `doGet(e)` and `doPost(e)` event parameter can be found at the following link : https://developers.google.com/apps-script/guides/web – TheAddonDepot Jul 02 '22 at 10:28
  • this document says every web app has a doGet and doPost function. Where to find the properties of the object used by gsender? – RockBoro Jul 02 '22 at 10:44
  • 1
    The documentation has a section called 'Request Parameters'. That should have what you need. – TheAddonDepot Jul 02 '22 at 11:00

0 Answers0