Skip to content
This repository has been archived by the owner on May 18, 2020. It is now read-only.

Commit

Permalink
Fixed syntax error in samples
Browse files Browse the repository at this point in the history
Gotta escape those single quotes!
  • Loading branch information
jasonjoh committed Feb 3, 2016
1 parent 100b136 commit 7079a9f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions mail-api.js
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ module.exports = {
* var token = 'eyJ0eXAiOiJKV1Q...';
*
* var newMsg = {
* Subject: 'Did you see last night's game?',
* Subject: 'Did you see last night\'s game?',
* Importance: 'Low',
* Body: {
* ContentType: 'HTML',
Expand Down Expand Up @@ -436,7 +436,7 @@ module.exports = {
* var token = 'eyJ0eXAiOiJKV1Q...';
*
* var newMsg = {
* Subject: 'Did you see last night's game?',
* Subject: 'Did you see last night\'s game?',
* Importance: 'Low',
* Body: {
* ContentType: 'HTML',
Expand Down
4 changes: 2 additions & 2 deletions reference/node-outlook.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ Create a new message

**Example**
```js
var outlook = require('node-outlook');// Set the API endpoint to use the v2.0 endpointoutlook.base.setApiEndpoint('https://outlook.office.com/api/v2.0');// This is the oAuth token var token = 'eyJ0eXAiOiJKV1Q...';var newMsg = { Subject: 'Did you see last night's game?', Importance: 'Low', Body: { ContentType: 'HTML', Content: 'They were <b>awesome</b>!' }, ToRecipients: [ { EmailAddress: { Address: 'azizh@contoso.com' } } ]};// Pass the user's email addressvar userInfo = { email: 'sarad@contoso.com'};outlook.mail.createMessage({token: token, message: newMsg, user: userInfo}, function(error, result){ if (error) { console.log('createMessage returned an error: ' + error); } else if (result) { console.log(JSON.stringify(result, null, 2)); } });
var outlook = require('node-outlook');// Set the API endpoint to use the v2.0 endpointoutlook.base.setApiEndpoint('https://outlook.office.com/api/v2.0');// This is the oAuth token var token = 'eyJ0eXAiOiJKV1Q...';var newMsg = { Subject: 'Did you see last night\'s game?', Importance: 'Low', Body: { ContentType: 'HTML', Content: 'They were <b>awesome</b>!' }, ToRecipients: [ { EmailAddress: { Address: 'azizh@contoso.com' } } ]};// Pass the user's email addressvar userInfo = { email: 'sarad@contoso.com'};outlook.mail.createMessage({token: token, message: newMsg, user: userInfo}, function(error, result){ if (error) { console.log('createMessage returned an error: ' + error); } else if (result) { console.log(JSON.stringify(result, null, 2)); } });
```
<a name="module_mail.updateMessage"></a>
### mail.updateMessage(parameters, [callback])
Expand Down Expand Up @@ -245,7 +245,7 @@ Sends a new message

**Example**
```js
var outlook = require('node-outlook');// Set the API endpoint to use the v2.0 endpointoutlook.base.setApiEndpoint('https://outlook.office.com/api/v2.0');// This is the oAuth token var token = 'eyJ0eXAiOiJKV1Q...';var newMsg = { Subject: 'Did you see last night's game?', Importance: 'Low', Body: { ContentType: 'HTML', Content: 'They were <b>awesome</b>!' }, ToRecipients: [ { EmailAddress: { Address: 'azizh@contoso.com' } } ]};// Pass the user's email addressvar userInfo = { email: 'sarad@contoso.com'};outlook.mail.sendNewMessage({token: token, message: newMsg, user: userInfo}, function(error, result){ if (error) { console.log('sendNewMessage returned an error: ' + error); } else if (result) { console.log(JSON.stringify(result, null, 2)); } });
var outlook = require('node-outlook');// Set the API endpoint to use the v2.0 endpointoutlook.base.setApiEndpoint('https://outlook.office.com/api/v2.0');// This is the oAuth token var token = 'eyJ0eXAiOiJKV1Q...';var newMsg = { Subject: 'Did you see last night\'s game?', Importance: 'Low', Body: { ContentType: 'HTML', Content: 'They were <b>awesome</b>!' }, ToRecipients: [ { EmailAddress: { Address: 'azizh@contoso.com' } } ]};// Pass the user's email addressvar userInfo = { email: 'sarad@contoso.com'};outlook.mail.sendNewMessage({token: token, message: newMsg, user: userInfo}, function(error, result){ if (error) { console.log('sendNewMessage returned an error: ' + error); } else if (result) { console.log(JSON.stringify(result, null, 2)); } });
```
<a name="module_mail.sendDraftMessage"></a>
### mail.sendDraftMessage(parameters, [callback])
Expand Down

0 comments on commit 7079a9f

Please sign in to comment.