SMS script no longer works after Rhino migrated to V8 runtime… (Apps Script)

Hello everyone

For some time now, my script in the Google Apps Script, which calls up several sheets and then automatically sends SMS with twilio using a trigger, no longer works. This after Rhino was migrated to V8 runtime.

var TWILIO_ACCOUNT_SID = 'XXXXX';
var TWILIO_SMS_NUMBER = 'XXXXX';
var TWILIO_AUTH_TOKEN = 'XXXXX';

var ss = SpreadsheetApp.getActiveSpreadsheet();
var sheetnames = ['Sheet-1', 'Sheet-2'];
sheetnames.forEach(function (name) {
  var sheet = ss.getSheetByName(name);
  var range = sheet.getRange('A2:K');
  var values = range.getValues();
  Test_SMS(sheet, values);
  
});

//////////////////////////////////////////////////////////////////////////////////////////////////////////


 function Test_SMS(sheet, values) {

 
  for (var i in values) {
     var row=i;
     var r = +row + 2;
     if (values[i][0] != '' && values[i][1] == '' ) {
       var number = '+41'+values[i][0];
       var vorname = values[i][2];
       var fahrt = values[i][9];
       var zustieg = values[i][4];
       var austieg = values[i][5];
       var ticket = values[i][6];
       var datum = sheet.getRange('L1').getValues();
       
       function sendSms(to, body) {
  var messages_url = 'https://api.twilio.com/2010-04-01/Accounts/' + TWILIO_ACCOUNT_SID + '/Messages.json';

  var payload = {
    "To": to,
    "Body" : 'XXXX' + vorname + ', XXXX ' + datum + '.\n\nXXXX ' + zustieg + ' XXXX ' + austieg + ' XXXX. \n\nXXXXX' + ticket + '. \n\n',
    "From" : 'XXXX'
  };

  var options = {
    "method" : "post",
    "payload" : payload
  };

  options.headers = {
    "Authorization" : "Basic " + Utilities.base64Encode(TWILIO_ACCOUNT_SID + ":" + TWILIO_AUTH_TOKEN)

  };

  UrlFetchApp.fetch(messages_url, options);
}
       try {
      response_data = sendSms(number, vorname, fahrt, zustieg, austieg, ticket, datum);
      status = "sent";
    } catch(err) {
      Logger.log(err);
      status = "error";
    }
    sheet.getRange(r, 2).setValue(status);
         
     } 
   
   }
   
  }

Now I wanted to ask if anyone has an idea what the problem could be or whether the whole script needs to be rewritten and if so how.

I am very grateful for any help.
Many thanks!

If you run it from the console, does it produce any errors?

I assume you have already enabled V8 runtime in your Apps Script?