This is a simple example of how to write code to use the Sendgrid PHP NG library.
- Composer
- SendGrid Account
- SendGrid API Key
- PHP 5.5 or greater
Copy the example config file to a live config file.
cp example.config.php config.php
Edit the new file config.php
and change the variables $sendgrid_api_key
and $to
to your settings.
Execute the PHP script either via a web server or using PHP CLI.