This sample application demonstrates how to send email with Send Grid when running in Google App Engine Flexible Environment.
-
Follow the set-up instructions in the documentation.
-
Install the Google Cloud SDK. The Google Cloud SDK is required to deploy .NET applications to App Engine.
-
Install the .NET Core SDK, version 2.0 or newer.
-
Edit appsettings.json. Replace
your-sendgrid-api-key
with your sendgrid api key.
PS > dotnet restore
PS > dotnet run
PS > dotnet restore
PS > dotnet publish
PS > gcloud beta app deploy .\bin\Debug\netcoreapp2.1\publish\app.yaml
Visual Studio is optional. An old, unmaintained branch of samples that work with Visual Studio 2015 is here.
Google Cloud Tools for Visual Studio make it easy to deploy to App Engine. Install them if you are running Visual Studio.
Open SendGrid.csproj, and Press F5.
-
In Solution Explorer, right-click the SendGrid project and choose Publish SendGrid to Google Cloud.
-
Click App Engine Flex.
-
Click Publish.