You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've put in the code according to the documentation the only thing I did was ad templating. Can anyone see what's wrong?
<?php
error_reporting(E_ALL);
ini_set("display_errors", 1);
date_default_timezone_set('EST');
# Include the API
require 'vendor/autoload.php';
require 'lib/SendGrid.php';
require 'html2text.php';
# Instantiate the client.
$sendgrid = new SendGrid('...', '...', array("turn_off_ssl_verification" => true));
$html = $_POST["message"];
$text = convert_html_to_text($html);
$date = date('l, F jS ');
# Make the call to the client.
$email = new SendGrid\Email();
$email
->addTo('...')
# ->addTo('...') uncomment on final script
->setFrom('...')
->setSubject('New reminder for ' . $date)
->setText($text)
->setHtml($html)
->addFilter("templates", "enabled", 1)
->addFilter("templates", "template_id", "a874a34a-a9b7-460b-a5ae-7226e68da0f1")
;
print '<h1>Sent successfully</h1>';
?>
Fatal error: Class 'SendGrid\Email' not found in /home/[...]/public_html/[...]/sendgrid.php on line 29
The text was updated successfully, but these errors were encountered:
I've put in the code according to the documentation the only thing I did was ad templating. Can anyone see what's wrong?
The text was updated successfully, but these errors were encountered: