I want to send emails from an Azure function (Javascript) using SendGrid. I have done the following
- created a new AppSettings for SendGrid API Key
- SendGrid output binding set of Azure Function
- Following is my Azure Function
module.exports = function (context, myQueueItem) {
var message = {
"personalizations": [ { "to": [ { "email": "testto@test.com" } ] } ],
from: { email: "testfrom@test.com" },
subject: "Azure news",
content: [{
type: 'text/plain',
value: myQueueItem
}]
};
context.done(null, message);
};
But email is not getting send. Please provide some pointers