sendgrid-php-example icon indicating copy to clipboard operation
sendgrid-php-example copied to clipboard

Example of using sendgrid-php library.

sendgrid-php-example

This is an example of using the SendGrid php library.

Usage

git clone https://github.com/sendgrid/sendgrid-php-example.git
cd sendgrid-php-example
cp .env.example .env
composer install
php -f sendgrid-php-example.php
php -f smtp-php-example.php

Make sure to set username, password and recipient in the .env file. If you're not sure why they're stored in the .env file you can read up on it here.