-
Notifications
You must be signed in to change notification settings - Fork 779
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
56 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -207,6 +207,27 @@ email.setCcs(['[email protected]', '[email protected]'); | |
sendgrid.send(email, function(err, json) { }); | ||
``` | ||
|
||
#### addBcc | ||
|
||
You can add one or multiple BCC addresses using `addBcc`. | ||
|
||
```javascript | ||
var email = new sendgrid.Email(); | ||
email.addBcc('[email protected]'); | ||
email.addBcc('[email protected]'); | ||
sendgrid.send(email, function(err, json) { }); | ||
``` | ||
|
||
#### setBccs | ||
|
||
You can multiple BCC addresses using `setBccs`. | ||
|
||
```javascript | ||
var email = new sendgrid.Email(); | ||
email.setBccs(['[email protected]', '[email protected]'); | ||
sendgrid.send(email, function(err, json) { }); | ||
``` | ||
|
||
#### setSubject | ||
|
||
```javascript | ||
|
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -298,6 +298,33 @@ describe('Email', function () { | |
expect(email.cc).to.eql(['[email protected]', '[email protected]']); | ||
}); | ||
|
||
it('should be possible to addBcc', function() { | ||
var email = new Email(); | ||
expect(email.bcc).to.eql([]); | ||
email.addBcc('[email protected]'); | ||
expect(email.bcc).to.eql(['[email protected]']); | ||
email.addBcc('[email protected]'); | ||
expect(email.bcc).to.eql(['[email protected]', '[email protected]']); | ||
}); | ||
|
||
it('should be possible to setBccs', function() { | ||
var email = new Email(); | ||
expect(email.bcc).to.eql([]); | ||
email.setBccs(['[email protected]']); | ||
expect(email.bcc).to.eql(['[email protected]']); | ||
email.setBccs(['[email protected]']); | ||
expect(email.bcc).to.eql(['[email protected]']); | ||
}); | ||
|
||
it('should be possible to setBccs and addBcc', function() { | ||
var email = new Email(); | ||
expect(email.bcc).to.eql([]); | ||
email.setBccs(['[email protected]']); | ||
expect(email.bcc).to.eql(['[email protected]']); | ||
email.addBcc('[email protected]'); | ||
expect(email.bcc).to.eql(['[email protected]', '[email protected]']); | ||
}); | ||
|
||
describe('files', function() { | ||
it('should support adding attachments via path', function() { | ||
var email = new Email(); | ||
|