Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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});
- };
- const sgMail = require('@sendgrid/mail');
- sgMail.setApiKey(process.env.SENDGRID_API_KEY);
- const msg = {
- to: 'recipient@example.org',
- from: 'sender@example.org',
- subject: 'Hello attachment',
- html: '<p>Here’s an attachment for you!</p>',
- attachments: [
- {
- content: 'Some base 64 encoded attachment content',
- filename: 'some-attachment.txt',
- type: 'plain/text',
- disposition: 'attachment',
- contentId: 'mytext'
- },
- ],
- };
- 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
- }],
- attachments: [
- {
- content: 'Some base 64 encoded attachment content',
- filename: 'some-attachment.txt',
- type: 'plain/text',
- disposition: 'attachment',
- contentId: 'mytext'
- },
- ]
- };
- context.done(null, {message});
- };
Add Comment
Please, Sign In to add comment