At the top of my index.php file I have:
require('sendgrid-php/SendGrid_loader.php');
And at the bottom I use this code to send the email:
<?php
if(isset($_POST['submit']))
{
$sendgrid = new SendGrid('app11445063@heroku.com', 'password');
$mail = new SendGrid\Mail();
$mail->
addTo('email@gmail.com')->
setFrom('app11445063@heroku.com')->
setSubject('Subject goes here')->
setText('Hello World!')->
setHtml('<strong>Hello World!</strong>');
$sendgrid->
smtp->
send($mail);
}
?>
I can't get the code to send an email out. I have the proper account from SendGrid and Heroku. The required files are in my directory. Do I have the wrong path to the required file?