php-docs-samples/appengine/php55/sendgrid at master · tmatsuo/php-docs-samples · GitHub
Skip to content

Latest commit

 

History

History
 
 

Folders and files

README.md

Sendgrid and Google App Engine Standard (PHP 5.5)

This sample application demonstrates how to use Sendgrid with Google App Engine Standard Environment.

Setup

Before running this sample:

  1. You will need a SendGrid account.
  2. Update SENDGRID_SENDER and SENDGRID_API_KEY in app.yaml to match your SendGrid credentials. You can use your account's sandbox domain.

Prerequisites

  • Install composer
  • Install dependencies by running:
composer install

Deploy to App Engine

Prerequisites

Run Locally

export SENDGRID_APIKEY=your-sendgrid-api-key
export SENDGRID_SENDER=somebody@yourdomain.com
php -S localhost:8000 -t .

Deploy with gcloud

gcloud config set project YOUR_PROJECT_ID
gcloud app deploy
gcloud app browse

The last command will open https://{YOUR_PROJECT_ID}.appspot.com/ in your browser.