Ho provato così, linkando il file direttamente e inserendo l'apikey

codice:
<?php// using SendGrid's PHP Library
// https://github.com/sendgrid/sendgrid-php
//require 'vendor/autoload.php';
require 'sendgrid-php/sendgrid-php.php';
$sendgrid = new SendGrid("apikey");
$email    = new SendGrid\Email();


$email->addTo("testmail@gmail.com")
      ->setFrom("testmail@gmail.com")
      ->setSubject("Sending with SendGrid is Fun")
      ->setHtml("and easy to do anywhere, even with PHP");


$sendgrid->send($email);


?>
ma mi da questo errore:

Fatal error: Uncaught Error: Class 'SendGrid\Email' not found in /web/htdocs/www.nomesito.it/home/api/SendGrid.php:7 Stack trace: #0 {main} thrown in /web/htdocs/www.nomesito.it/home/api/SendGrid.php on line 7