-
Notifications
You must be signed in to change notification settings - Fork 780
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Added support of replyToList in the library, #339: #1303
feat: Added support of replyToList in the library, #339: #1303
Conversation
…to f/replyToMultiple
Added support of replyToList in the library
- Use the replyToList header to set multiple emailIds in the reply-to section of an email - Fixed old test cases that were failing as SendGrid changed the acceptable response code to 202
- removed commented unused code - Fixed typo in error message string - added missing test cases - added example doc of replyToLIst in use-cases
…to feature/replyToListImplementation
packages/mail/src/mail.spec.js
Outdated
@@ -38,12 +38,12 @@ describe('sgMail.send()', () => { | |||
return expect(sgMail.send()).to.eventually.be.rejectedWith(Error); | |||
}); | |||
|
|||
it('should send a basic email', () => { | |||
sgClient.setDefaultHeader('X-Mock', 201); | |||
it('should send a basic email', async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't look like async is supported in node 6/8 which we still support
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure, will look into it and do the required changes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@shwetha-manvinkurke - I removed the use of async in the test case as you suggested
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the contribution!
Fixes #339
Fixes #1301
The replyToList support was added in v3 API but it wasn't supported in the library. With this changes, we can:
email
parameter and may also contain a name parameter.Acceptable Format:
[ { "name": "Test Team", "email": "[email protected]" }, { "name": "Support Test Team", "email": "[email protected]" } ]
or
[ { "email": "[email protected]" }, { "name": "Support Test Team", "email": "[email protected]" } ]