Created
April 8, 2019 19:43
-
-
Save rafaelvicio/5d27aa29fafe4c0772440de410c7a8bb to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| "use strict"; | |
| const sgMail = require("@sendgrid/mail"); | |
| module.exports.hello = function(context) { | |
| context.log("JavaScript HTTP trigger function processed a request."); | |
| sgMail.setApiKey(process.env.SENDGRID_API_KEY); | |
| const msg = { | |
| to: "[email protected]", | |
| from: "[email protected]", | |
| subject: "Reminder Labor", | |
| html: "<strong>Please check out their activities at Labor</strong>" | |
| }; | |
| sgMail.send(msg); | |
| context.res = { | |
| body: "Go Serverless v1.x! Your function executed successfully!" | |
| }; | |
| context.done(); | |
| }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment