Expected unqualified-id before string constant

Arduino: 1.8.15 (Mac OS X), Board: "NodeMCU 1.0 (ESP-12E Module), 80 MHz, Flash, Disabled (new aborts on oom), Disabled, All SSL ciphers (most compatible), 32KB cache + 32KB IRAM (balanced), Use pgm_read macros for IRAM/PROGMEM, 4MB (FS:2MB OTA:~1019KB), 2, v2 Lower Memory, Disabled, None, Only Sketch, 115200"

TEST_FOR_MAIL:23:34: error: 'trigger' was not declared in this scope
23 | const String url = "/trigger/" + trigger + "/with/key/" + key;
| ^~~~~~~
TEST_FOR_MAIL:23:59: error: 'key' was not declared in this scope; did you mean 'key_t'?
23 | const String url = "/trigger/" + trigger + "/with/key/" + key;
| ^~~
| key_t
/Users/Daniel/TEST_FOR_MAIL/TEST_FOR_MAIL.ino: In function 'void setup()':
TEST_FOR_MAIL:47:21: error: 'mesureDistance' was not declared in this scope
47 | distance_bottom = mesureDistance();
| ^~~~~~~~~~~~~~
TEST_FOR_MAIL:51:54: error: 'rebootChip' was not declared in this scope
51 | attachInterrupt(digitalPinToInterrupt(BUTTON_PIN), rebootChip, RISING);
| ^~~~~~~~~~
TEST_FOR_MAIL:54:26: error: 'ledInterrupt' was not declared in this scope; did you mean 'noInterrupts'?
54 | timer1_attachInterrupt(ledInterrupt);
| ^~~~~~~~~~~~
| noInterrupts
/Users/Daniel/TEST_FOR_MAIL/TEST_FOR_MAIL.ino: In function 'void loop()':
TEST_FOR_MAIL:64:72: error: 'button_timer' was not declared in this scope
64 | Serial.println("Button pressed, the chip will reboot in " + String(button_timer) + "s");
| ^~~~~~~~~~~~
/Users/Daniel/TEST_FOR_MAIL/TEST_FOR_MAIL.ino: At global scope:
TEST_FOR_MAIL:71:3: error: expected unqualified-id before 'if'
71 | if ((millis() - time_of_last_letter) > time_between_two_letters_are_detected*1000 && isNewObjectDetected()) {
| ^~
TEST_FOR_MAIL:76:8: error: expected constructor, destructor, or type conversion before '(' token
76 | delay(time_between_two_measurements);
| ^
TEST_FOR_MAIL:78:3: error: expected unqualified-id before 'if'
78 | if (nbr_of_new_letters > 0) {
| ^~
TEST_FOR_MAIL:90:5: error: expected unqualified-id before 'else'
90 | } else {
| ^~~~
TEST_FOR_MAIL:98:3: error: expected unqualified-id before 'if'
98 | if (nbr_of_new_letters > 0 && (millis() - time_of_last_letter) > time_before_weebhook_is_triggered * 1000 ) {
| ^~
TEST_FOR_MAIL:132:3: error: 'Serial' does not name a type
132 | Serial.println();
| ^~~~~~
TEST_FOR_MAIL:133:1: error: expected declaration before '}' token
133 | }
| ^
/Users/Daniel/TEST_FOR_MAIL/TEST_FOR_MAIL.ino: In function 'bool sendIFTTTRequest()':
TEST_FOR_MAIL:150:18: error: 'host' was not declared in this scope
150 | Serial.println(host);
| ^~~~
TEST_FOR_MAIL:152:43: error: 'httpsPort' was not declared in this scope
152 | int connect_code = client.connect(host, httpsPort);
| ^~~~~~~~~
TEST_FOR_MAIL:156:5: error: 'closeConnection' was not declared in this scope
156 | closeConnection(client);
| ^~~~~~~~~~~~~~~
TEST_FOR_MAIL:178:3: error: 'closeConnection' was not declared in this scope
178 | closeConnection(client);
| ^~~~~~~~~~~~~~~
/Users/Daniel/TEST_FOR_MAIL/TEST_FOR_MAIL.ino: In function 'bool connectWifi()':
TEST_FOR_MAIL:195:7: error: 'WPA2_Entreprise_enabled' was not declared in this scope
195 | if (WPA2_Entreprise_enabled) {
| ^~~~~~~~~~~~~~~~~~~~~~~
TEST_FOR_MAIL:202:5: error: 'ssid' was not declared in this scope
202 | ssid.toCharArray(char_ssid, 32);
| ^~~~
TEST_FOR_MAIL:203:5: error: 'password' was not declared in this scope
203 | password.toCharArray(char_password, 64);
| ^~~~~~~~
TEST_FOR_MAIL:213:5: error: 'username' was not declared in this scope
213 | username.toCharArray(char_username, 32);
| ^~~~~~~~
TEST_FOR_MAIL:236:16: error: 'ssid' was not declared in this scope
236 | WiFi.begin(ssid, password);
| ^~~~
TEST_FOR_MAIL:236:22: error: 'password' was not declared in this scope
236 | WiFi.begin(ssid, password);
| ^~~~~~~~
/Users/Daniel/TEST_FOR_MAIL/TEST_FOR_MAIL.ino: In function 'bool isNewObjectDetected()':
TEST_FOR_MAIL:253:21: error: 'mesureDistance' was not declared in this scope
253 | double distance = mesureDistance();
| ^~~~~~~~~~~~~~
TEST_FOR_MAIL:282:23: error: 'min_time_before_next_ultrasonic' was not declared in this scope
282 | delayMicroseconds(min_time_before_next_ultrasonic);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
TEST_FOR_MAIL:296:68: error: 'distance_change_to_detect' was not declared in this scope
296 | if (nbr_mesure == 100 || moyenne_distance > (distance_bottom + distance_change_to_detect) || moyenne_distance < (distance_bottom - distance_change_to_detect)) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~
/Users/Daniel/TEST_FOR_MAIL/TEST_FOR_MAIL.ino: In function 'void ledInterrupt()':
TEST_FOR_MAIL:349:21: error: 'led_timer_max' was not declared in this scope
349 | led_cpt = led_cpt%led_timer_max;
| ^~~~~~~~~~~~~
exit status 1
'trigger' was not declared in this scope

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.