From 3df1f6c5d58ce566ad93f3cd1894d4eb310296ca Mon Sep 17 00:00:00 2001 From: Cole Furfaro-Strode Date: Mon, 14 Mar 2016 10:06:11 -0400 Subject: [PATCH 1/2] removes from and subject from transmission stored template send example --- examples/transmissions/stored_template_send.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/examples/transmissions/stored_template_send.js b/examples/transmissions/stored_template_send.js index 91e8246..7868560 100644 --- a/examples/transmissions/stored_template_send.js +++ b/examples/transmissions/stored_template_send.js @@ -8,9 +8,7 @@ var reqOpts = { transmissionBody: { recipients: [{ address: { email: 'john.doe@example.com' } }], content: { - template_id: 'my-template', - from: 'From Envelope ', - subject: 'Example Email for Stored Template' + template_id: 'my-template' } } }; From d8e834fd9f46933de03d763a94b42c0d7e71e0d8 Mon Sep 17 00:00:00 2001 From: Cole Furfaro-Strode Date: Mon, 14 Mar 2016 10:19:28 -0400 Subject: [PATCH 2/2] adds common properties transmission stored template send example --- examples/transmissions/stored_template_send.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/examples/transmissions/stored_template_send.js b/examples/transmissions/stored_template_send.js index 7868560..5189262 100644 --- a/examples/transmissions/stored_template_send.js +++ b/examples/transmissions/stored_template_send.js @@ -6,10 +6,12 @@ var key = 'YOURAPIKEY' var reqOpts = { transmissionBody: { - recipients: [{ address: { email: 'john.doe@example.com' } }], + campaignId: 'ricks-campaign', content: { - template_id: 'my-template' - } + template_id: 'ricks-template' + }, + 'num_rcpt_errors': 3, + recipients: [{ address: { email: 'rick.sanchez@rickandmorty100years.com', name: 'Rick Sanchez' } }] } }; @@ -18,6 +20,6 @@ client.transmissions.send(reqOpts, function(err, res) { console.log(err); } else { console.log(res.body); - console.log('Congrats you can use our SDK!'); + console.log('What up my glib globs! SparkPost!'); } });