This project allows you to deploy a SendGrid email service
- Prerequisites & Dependencies
- Installation
- Quick Start
- Usage
- Use Cases
- Roadmap
- How to Contribute
- Troubleshooting
- About
- [IBM Cloud Account]
- IBM CLI
- SendGrid Account
- SendGrid API Key
- GitHub Account
- Docker
Update the email addresses in app.py
.
bx plugin install Cloud-Functions -r Bluemix
bx login -a api.ng.bluemix.net -o <YOUR IBM CLOUD USERNAME> -s dev
docker run --rm -v "$PWD:/tmp" ibmfunctions/action-python-v3 \
bash -c "cd tmp && virtualenv virtualenv && source virtualenv/bin/activate && pip install -r requirements.txt"
zip -r helloSendGrid.zip virtualenv __main__.py app.py
bx wsk action create helloSendGrid --kind python-jessie:3 helloSendGrid.zip
The following is the procedure for updating your IBM Cloud Function after making a code change:
zip -r helloSendGrid.zip virtualenv __main__.py app.py
bx wsk action update helloSendGrid --kind python-jessie:3 helloSendGrid.zip
Go to the IBM Cloud Functions Actions page.
Click the "helloSendGrid" link.
Click the "Parameters" link.
"Add" a parameter with the "Parameter Name" SENDGRID_API_KEY and the "Parameter Value" is your SendGrid API Key.
bx wsk action invoke --result helloSendGrid
In addition the Quick Start, you can access your IBM Cloud Function using CURL.
cp .env_sample .env
Replace YOUR IBM CLOUD API KEY with your IBM Cloud API Key.
source .env
Go to the IBM Cloud Functions Actions page.
Click the "helloSendGrid" link.
Click the "Endpoints" link.
Copy the commands under "CURL" and replace API-KEY with $IBM_CLOUD_API_KEY.
Send an email using the command line.
Come join me at IBM Index 2018 on 2/2/18.
Add the ability to pass in various paramaters such as to email, from email, subject and body.
Add Web Action and Gateway support.
Add tests.
Update documentation.
I encourage contribution to this project, please see our CONTRIBUTING guide for details.
Please see the troubleshooting guide for common library issues.
sendgrid-ibm-index-open-source-workshop is supported by the SendGrid Developer Experience Team.